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
// <rdar://problem/20201968> QoI: poor diagnostic when calling a class method via a metatype
205
205
classr20201968C{
206
206
func blah(){
207
-
r20201968C.blah() // expected-error {{use of instance member 'blah' on type 'r20201968C'; did you mean to use a value of type 'r20201968C' instead?}}
207
+
r20201968C.blah() // expected-error {{instance member 'blah' cannot be used on type 'r20201968C'; did you mean to use a value of this type instead?}}
208
208
}
209
209
}
210
210
@@ -363,12 +363,12 @@ c.method2(1.0)(2.0) // expected-error {{cannot convert value of type 'Double' to
363
363
CurriedClass.method1(c)()
364
364
_ =CurriedClass.method1(c)
365
365
CurriedClass.method1(c)(1) // expected-error {{argument passed to call that takes no arguments}}
366
-
CurriedClass.method1(2.0)(1) // expected-error {{use of instance member 'method1' on type 'CurriedClass'; did you mean to use a value of type 'CurriedClass' instead?}}
366
+
CurriedClass.method1(2.0)(1) // expected-error {{instance member 'method1' cannot be used on type 'CurriedClass'; did you mean to use a value of this type instead?}}
367
367
368
368
CurriedClass.method2(c)(32)(b:1) // expected-error{{extraneous argument label 'b:' in call}}
369
369
_ =CurriedClass.method2(c)
370
370
_ =CurriedClass.method2(c)(32)
371
-
_ =CurriedClass.method2(1,2) // expected-error {{use of instance member 'method2' on type 'CurriedClass'; did you mean to use a value of type 'CurriedClass' instead?}}
371
+
_ =CurriedClass.method2(1,2) // expected-error {{instance member 'method2' cannot be used on type 'CurriedClass'; did you mean to use a value of this type instead?}}
372
372
CurriedClass.method2(c)(1.0)(b:1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}}
373
373
CurriedClass.method2(c)(1)(1.0) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}}
_ =CurriedClass.method3(c)(1, b:2)(32) // expected-error {{cannot call value of non-function type '()'}}
380
-
_ =CurriedClass.method3(1,2) // expected-error {{use of instance member 'method3' on type 'CurriedClass'; did you mean to use a value of type 'CurriedClass' instead?}}
380
+
_ =CurriedClass.method3(1,2) // expected-error {{instance member 'method3' cannot be used on type 'CurriedClass'; did you mean to use a value of this type instead?}}
381
381
CurriedClass.method3(c)(1.0, b:1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}}
382
382
CurriedClass.method3(c)(1) // expected-error {{missing argument for parameter 'b' in call}}
383
383
@@ -400,11 +400,11 @@ extension CurriedClass {
400
400
}
401
401
402
402
// <rdar://problem/23718816> QoI: "Extra argument" error when accidentally currying a method
403
-
CurriedClass.m1(2, b:42) // expected-error {{use of instance member 'm1' on type 'CurriedClass'; did you mean to use a value of type 'CurriedClass' instead?}}
403
+
CurriedClass.m1(2, b:42) // expected-error {{instance member 'm1' cannot be used on type 'CurriedClass'; did you mean to use a value of this type instead?}}
404
404
405
405
406
406
// <rdar://problem/22108559> QoI: Confusing error message when calling an instance method as a class method
407
-
CurriedClass.m2(12) // expected-error {{use of instance member 'm2' on type 'CurriedClass'; did you mean to use a value of type 'CurriedClass' instead?}}
407
+
CurriedClass.m2(12) // expected-error {{instance member 'm2' cannot be used on type 'CurriedClass'; did you mean to use a value of this type instead?}}
0 commit comments