Skip to content

Commit 5ba66aa

Browse files
committed
Add test case for #60029
The issue has been fixed by allowing holes for variables in paterns.
1 parent f623440 commit 5ba66aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/Constraints/overload.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,10 @@ func rdar79672230() {
257257
var t: MyType = MyType()
258258
test(&t) // expected-error {{no exact matches in call to local function 'test'}}
259259
}
260+
261+
// https://github.com/apple/swift/issues/60029
262+
for (key, values) in oldName { // expected-error{{cannot find 'oldName' in scope}}
263+
for (idx, value) in values.enumerated() {
264+
print(key, idx, value)
265+
}
266+
}

0 commit comments

Comments
 (0)