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
[CSStep] Properly finalize component step without follow-up steps
Currently finalization e.g. scope reset and solution minimization
is only done if component step had follow-up e.g. type variable or
disjunction step(s), but it should be done if `take` generated any
fixes as well, or component changed score in any way, otherwise
we might miss some solutions with fixes because "best score" haven't
been reset properly.
// <rdar://problem/21718970> QoI: [uninferred generic param] cannot invoke 'foo' with an argument list of type '(Int)'
227
-
classWhatever<A:Numeric, B:Numeric>{ // expected-note 2 {{'A' declared as parameter to type 'Whatever'}}
227
+
classWhatever<A:Numeric, B:Numeric>{ // expected-note 2 {{'A' declared as parameter to type 'Whatever'}} expected-note {{'B' declared as parameter to type 'Whatever'}}
228
228
staticfunc foo(a:B){}
229
229
230
230
staticfunc bar(){}
@@ -233,7 +233,9 @@ class Whatever<A: Numeric, B: Numeric> { // expected-note 2 {{'A' declared as p
233
233
Whatever.foo(a:23) // expected-error {{generic parameter 'A' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{9-9=<<#A: Numeric#>, Int>}}
234
234
235
235
// <rdar://problem/21718955> Swift useless error: cannot invoke 'foo' with no arguments
236
-
Whatever.bar() // expected-error {{generic parameter 'A' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{9-9=<<#A: Numeric#>, <#B: Numeric#>>}}
236
+
// TODO(diagnostics): We should try to produce a single note in this case.
237
+
Whatever.bar() // expected-error {{generic parameter 'A' could not be inferred}} expected-note 2 {{explicitly specify the generic arguments to fix this issue}} {{9-9=<<#A: Numeric#>, <#B: Numeric#>>}}
238
+
// expected-error@-1 {{generic parameter 'B' could not be inferred}}
237
239
238
240
// <rdar://problem/27515965> Type checker doesn't enforce same-type constraint if associated type is Any
0 commit comments