We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 649889f commit 4d3aa95Copy full SHA for 4d3aa95
test/expr/closure/inference.swift
@@ -77,3 +77,12 @@ cc(1) // Ok
77
func SR12955() {
78
let f: @convention(c) (T) -> Void // expected-error {{cannot find type 'T' in scope}}
79
}
80
+
81
+// https://github.com/apple/swift/issues/42790
82
+do {
83
+ func foo<T>(block: () -> ()) -> T.Type { T.self } // expected-note {{in call to function 'foo(block:)'}}
84
85
+ let x = foo { // expected-error {{generic parameter 'T' could not be inferred}}
86
+ print("")
87
+ }
88
+}
0 commit comments