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
// expected-note @+5 2 {{candidate requires that 'Int' conform to 'Differentiable' (requirement specified as 'T' == 'Differentiable')}}
180
182
// expected-error @+4 {{generic signature requires types 'Vector<T>' and 'Vector<T>.TangentVector' to be the same}}
181
183
// expected-error @+3 {{generic signature requires types 'Vector<U>' and 'Vector<U>.TangentVector' to be the same}}
182
184
// expected-error @+2 {{parameter type 'Vector<T>' does not conform to 'Differentiable' and satisfy 'Vector<T> == Vector<T>.TangentVector', but the enclosing function type is '@differentiable(linear)'}}
183
185
// expected-error @+1 {{result type 'Vector<U>' does not conform to 'Differentiable' and satisfy 'Vector<U> == Vector<U>.TangentVector', but the enclosing function type is '@differentiable(linear)'}}
_ =CurriedClass.method3(c)(1, b:2)(32) // expected-error {{cannot call value of non-function type '()'}}
1538
-
_ =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?}}
1539
-
// expected-error@-1 {{missing argument label 'b:' in call}}
1540
-
CurriedClass.method3(c)(1.0, b:1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}}
1541
-
CurriedClass.method3(c)(1) // expected-error {{missing argument for parameter 'b' in call}}
// expected-error@-1 {{cannot convert value of type 'Double' to expected argument type 'Int'}}
1544
-
// expected-error@-2 {{missing argument for parameter #1 in call}}
1545
-
1546
-
1547
-
extensionCurriedClass{
1548
-
func f(){
1549
-
method3(1, b:2)
1550
-
method3() // expected-error {{missing arguments for parameters #1, 'b' in call}} {{13-13=<#Int#>, b: <#Int#>}}
1551
-
method3(42) // expected-error {{missing argument for parameter 'b' in call}}
1552
-
method3(self)
1553
-
// expected-error@-1:13 {{cannot convert value of type 'CurriedClass' to expected argument type 'Int'}}
1554
-
// expected-error@-2:17 {{missing argument for parameter 'b' in call}} {{17-17=, b: <#Int#>}}
1555
-
}
1556
-
}
1557
-
1558
-
extensionCurriedClass{
1559
-
func m1(_ a :Int, b :Int){}
1560
-
1561
-
func m2(_ a :Int){}
1562
-
}
1563
-
1564
-
// <rdar://problem/23718816> QoI: "Extra argument" error when accidentally currying a method
1565
-
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?}}
1566
-
1567
-
1568
-
// <rdar://problem/22108559> QoI: Confusing error message when calling an instance method as a class method
1569
-
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?}}
f11(3, f4) // expected-error {{global function 'f11' requires that 'Int' conform to 'P2'}}
1250
1251
1251
-
// FIXME: Arguably we should also prefer the conformance failure in this case.
1252
-
letf12:(Int)->Void={ _ in}
1253
-
func f12<T :P2>(_ n:T, _ f:@escaping(T)->T){}
1254
-
f12(3, f4)// expected-error {{extra argument in call}}
1252
+
letf12:(Int)->Void={ _ in} // expected-note {{candidate '(Int) -> Void' requires 1 argument, but 2 were provided}}
1253
+
func f12<T :P2>(_ n:T, _ f:@escaping(T)->T){} // expected-note {{candidate requires that 'Int' conform to 'P2' (requirement specified as 'T' == 'P2')}}
1254
+
f12(3, f4)// expected-error {{no exact matches in call to global function 'f12'}}
0 commit comments