Open hamishknight opened 1 week ago
Has to do with literals:
extension Int {
func foo() -> Int {}
var bar: Int {
get {}
}
}
func test(i: Int) {
// Error
let _ = i.foo<Int>()
let _ = i.bar<Int>
// OK
let _ = 0.foo<Int>()
let _ = 0.bar<Int>
}
Really it's anything that isn't immediately resolved in CSGen, e.g:
extension Int {
func foo() -> Int { 0 }
func foo(_ x: Int = 0) -> Int { 0 }
}
func test(i: Int) {
let _ = i.foo<Int>
}
This is incorrectly allowed to compile: