bugcompilerdiagnostics qualitygood first issuetype checker
Description
| Previous ID | SR-8797 |
| Radar | rdar://problem/44616337 |
| Original Reporter | @jeremyabannister |
| Type | Bug |
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, DiagnosticsQoI, StarterBug, TypeChecker |
| Assignee | None |
| Priority | Medium |
md5: f2dc6c9ca2ac0b74c004d15fc50e5a7b
Issue Description:
typealias Executable <Input> = (Input)->()
let test: Executable<Void>? = { }
The code above leads to the error:
Cannot convert value of type '() -> ()' to specified type '((Void) -> ())?'
Whereas this code compiles successfully:
typealias Executable <Input> = (Input)->()
let test: Executable<Void>? = { _ in }