Skip to content

Commit bccf17b

Browse files
authored
Merge pull request #38632 from xedin/rdar-80797176-test
[TypeChecker] NFC: Add a test-case for `for-each` with `where` clause
2 parents 7c562ea + 2f6407d commit bccf17b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/Constraints/patterns.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,3 +514,9 @@ func rdar64157451() {
514514
if case .foo(let v as DoeNotExist) = e {} // expected-error {{cannot find type 'DoeNotExist' in scope}}
515515
}
516516
}
517+
518+
// rdar://80797176 - circular reference incorrectly diagnosed while reaching for a type of a pattern.
519+
func rdar80797176 () {
520+
for x: Int in [1, 2] where x.bitWidth == 32 { // Ok
521+
}
522+
}

0 commit comments

Comments
 (0)