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
[ConstraintSystem] Don't record a mismatch for synthesized arguments
Without context synthesized argument would be inferred as a hole,
so let's not record any additional fixes for it if there is no way
to infer it properly from a parameter (which could also be a hole
if it is a generic parameter type).
Resolves: rdar://78781552
// expected-note@-3 {{'Content' declared as parameter to type 'Test'}}
896
+
vardata:[Data]
897
+
varfilter:(Data.Element)->Content
898
+
}
899
+
900
+
func test(data:[Int]?){
901
+
Test(data?.filter)
902
+
// expected-error@-1 {{generic struct 'Test' requires that '(((Int) throws -> Bool) throws -> [Int])?' conform to 'RandomAccessCollection'}}
903
+
// expected-error@-2 {{generic parameter 'Content' could not be inferred}} expected-note@-2 {{explicitly specify the generic arguments to fix this issue}}
904
+
// expected-error@-3 {{cannot convert value of type '(((Int) throws -> Bool) throws -> [Int])?' to expected argument type '[(((Int) throws -> Bool) throws -> [Int])?]'}}
905
+
// expected-error@-4 {{missing argument for parameter 'filter' in call}}
0 commit comments