We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 440bc39 commit 4a2d139Copy full SHA for 4a2d139
test/Constraints/pack-expansion-expressions.swift
@@ -332,6 +332,15 @@ func test_pack_expansions_with_closures() {
332
takesVariadicFunction { y in fn(x, y) } // Ok
333
takesVariadicFunction { y, z in fn(y, z) } // Ok
334
}
335
+
336
+ // rdar://108977234 - invalid error non-pack type instead of missing `Hashable` conformance
337
+ func testEscapingCapture<each T>(_ t: repeat each T) -> () -> [AnyHashable] {
338
+ return {
339
+ var result = [AnyHashable]()
340
+ repeat result.append(each t) // expected-error {{argument type 'each T' does not conform to expected type 'Hashable'}}
341
+ return result
342
+ }
343
344
345
346
// rdar://107151854 - crash on invalid due to specialized pack expansion
0 commit comments