Skip to content

Commit e7a8290

Browse files
authored
Merge pull request #77643 from hamishknight/add-test
[test] Add test case for rdar://139913219
2 parents 7bbb63a + b9cb2f3 commit e7a8290

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/Constraints/rdar139913219.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown
2+
3+
// rdar://139913219 - Make sure we don't crash.
4+
5+
func bar(_ x: Int.Type, _: Int) {}
6+
func bar<T>(_ x: T.Type, _: Int) {}
7+
8+
func foo() {
9+
// FIXME: We shouldn't be failing to produce a diagnostic.
10+
// Once resolved, remove '-verify-ignore-unknown'
11+
bar(X<Int?>.self, .zero)
12+
// expected-error@-1 {{cannot find 'X' in scope}}
13+
// expected-error@-2 {{failed to produce diagnostic for expression}}
14+
}

0 commit comments

Comments
 (0)