Skip to content

Commit af8b040

Browse files
committed
Add regression test to close #42790
1 parent 649889f commit af8b040

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/expr/closure/inference.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,11 @@ cc(1) // Ok
7777
func SR12955() {
7878
let f: @convention(c) (T) -> Void // expected-error {{cannot find type 'T' in scope}}
7979
}
80+
81+
do {
82+
func SR168<T>(c: () -> ()) -> T.Type { T.self } // expected-note {{in call to function 'SR168(c:)'}}
83+
84+
let x = SR168 { // expected-error {{generic parameter 'T' could not be inferred}}
85+
print("")
86+
}
87+
}

0 commit comments

Comments
 (0)