You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[AST] Fix canonicalization of the function input types
Currently canonicalization of the input type was happening standalone
which means that outer parens are regarded as suger and removed,
this is incorrect after SE-0110 and such parens can't be stripped.
f8(3, f4) // expected-error {{in argument type '(Int) -> Int', 'Int' does not conform to expected type 'P2'}}
98
98
typealiasTup=(Int,Double)
99
99
func f9(_ x:Tup)->Tup{return x }
100
-
f8((1,2.0), f9) // expected-error {{in argument type '(Tup) -> Tup' (aka '(Int, Double) -> (Int, Double)'), 'Tup' (aka '(Int, Double)') does not conform to expected type 'P2'}}
100
+
f8((1,2.0), f9) // expected-error {{in argument type '(Tup) -> Tup' (aka '((Int, Double)) -> (Int, Double)'), 'Tup' (aka '(Int, Double)') does not conform to expected type 'P2'}}
101
101
102
102
// <rdar://problem/19658691> QoI: Incorrect diagnostic for calling nonexistent members on literals
103
103
1.doesntExist(0) // expected-error {{value of type 'Int' has no member 'doesntExist'}}
0 commit comments