Skip to content

Commit

Permalink
Add regression test to close swiftlang#42790
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyLatsis committed Jun 17, 2022
1 parent 649889f commit af8b040
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/expr/closure/inference.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,11 @@ cc(1) // Ok
func SR12955() {
let f: @convention(c) (T) -> Void // expected-error {{cannot find type 'T' in scope}}
}

do {
func SR168<T>(c: () -> ()) -> T.Type { T.self } // expected-note {{in call to function 'SR168(c:)'}}

let x = SR168 { // expected-error {{generic parameter 'T' could not be inferred}}
print("")
}
}

0 comments on commit af8b040

Please sign in to comment.