Skip to content

Commit 8cd8854

Browse files
authored
Merge pull request #60504 from LucianoPAlmeida/any-pattern-hole
[test] Add any_pattern in tuple pattern element extra tests
2 parents 0cc2ee1 + 89c1a4e commit 8cd8854

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

test/Constraints/overload.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,6 @@ func rdar79672230() {
258258
test(&t) // expected-error {{no exact matches in call to local function 'test'}}
259259
}
260260

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-
}
267-
268261
// rdar://97396399 - crash in swift::DiagnosticEngine::formatDiagnosticText
269262
func rdar97396399() {
270263
// Has to be overloaded to make sure that contextual type is not recorded during constraint generation

test/Constraints/patterns.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,3 +521,16 @@ func rdar80797176 () {
521521
for x: Int in [1, 2] where x.bitWidth == 32 { // Ok
522522
}
523523
}
524+
525+
// https://github.com/apple/swift/issues/60029
526+
for (key, values) in oldName { // expected-error{{cannot find 'oldName' in scope}}
527+
for (idx, value) in values.enumerated() {
528+
print(key, idx, value)
529+
}
530+
}
531+
532+
// https://github.com/apple/swift/issues/60503
533+
func f60503() {
534+
let (key, _) = settings.enumerate() // expected-error{{cannot find 'settings' in scope}}
535+
let (_, _) = settings.enumerate() // expected-error{{cannot find 'settings' in scope}}
536+
}

0 commit comments

Comments
 (0)