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
// FIXME: This is not ambiguous, the actual problem is that 'u' has the wrong
21
-
// type - "U" is not the same as "T".
22
-
return t1.isEqual(u) // expected-error {{type of expression is ambiguous without more context}}
20
+
return t1.isEqual(u) // expected-error {{cannot invoke 'isEqual' with an argument list of type '(U)'}} expected-note {{expected an argument list of type '(T)'}}
// FIXME: This is not ambiguous, the actual problem is that 'u' has the wrong
175
-
// type - "U" is not the same as "T".
176
-
T.isEqual(t, y: u) // expected-error{{type of expression is ambiguous without more context}}
172
+
T.isEqual(t, y: u) // expected-error{{cannot invoke 'isEqual' with an argument list of type '(T, y: U)'}} expected-note {{expected an argument list of type '(T, y: T)'}}
let _:String=testIS1() // expected-error {{cannot convert value of type 'Int' to specified type 'String'}}
92
92
93
93
func insertA<T>(inout array :[T], elt :T){
94
-
array.append(T); // expected-error {{ambiguous reference to member 'append'}}
94
+
array.append(T); // expected-error {{cannot invoke 'append' with an argument list of type '((T).Type)'}} expected-note {{expected an argument list of type '(T)'}}
95
95
}
96
96
97
97
// <rdar://problem/17875634> can't append to array of tuples
@@ -130,6 +130,6 @@ func test17875634() {
130
130
131
131
// <rdar://problem/20770032> Pattern matching ranges against tuples crashes the compiler
132
132
func test20770032(){
133
-
if case let1...10=(1,1){ // expected-warning{{'let' pattern has no effect; sub-pattern didn't bind any variables}} {{11-15=}} expected-error{{cannot convert value of type '(Int, Int)' to expected argument type 'Range<Int>'}}
133
+
if case let1...10=(1,1){ // expected-warning{{'let' pattern has no effect; sub-pattern didn't bind any variables}} {{11-15=}} expected-error{{expression pattern of type 'Range<Int>' cannot match values of type '(Int, Int)'}}
0 commit comments