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
Copy file name to clipboardExpand all lines: test/Constraints/enum_cases.swift
+4-4
Original file line number
Diff line number
Diff line change
@@ -22,14 +22,14 @@ let _ = arr.map(E.bar) // Ok
22
22
let _ = arr.map(E.two) // expected-error {{cannot invoke 'map' with an argument list of type '(@escaping (Int, Int) -> E)'}}
23
23
// expected-note@-1{{expected an argument list of type '((Self.Element) throws -> T)'}}
24
24
25
-
let _ = arr.map(E.tuple) // expected-error {{cannot invoke 'map' with an argument list of type '(@escaping ((x: Int, y: Int)) -> E)'}}
26
-
// expected-note@-1{{expected an argument list of type '((Self.Element) throws -> T)'}}
25
+
let _ = arr.map(E.tuple) // expected-error {{cannot convert value of type '((x: Int, y: Int)) -> E' to expected argument type '(String) throws -> T'}}
26
+
// expected-error@-1 {{generic parameter 'T' could not be inferred}}
27
27
28
28
let _ = arr.map(G_E<String>.foo) // Ok
29
29
let _ = arr.map(G_E<String>.bar) // Ok
30
30
let _ = arr.map(G_E<String>.two) // expected-error {{cannot convert value of type '(String, String) -> G_E<String>' to expected argument type '(String) throws -> G_E<String>'}}
31
-
let _ = arr.map(G_E<Int>.tuple) // expected-error {{cannot invoke 'map' with an argument list of type '(@escaping ((x: Int, y: Int)) -> G_E<Int>)'}}
32
-
// expected-note@-1{{expected an argument list of type '((Self.Element) throws -> T)'}}
31
+
let _ = arr.map(G_E<Int>.tuple) // expected-error {{cannot convert value of type '((x: Int, y: Int)) -> G_E<Int>' to expected argument type '(String) throws -> T'}}
32
+
// expected-error@-1 {{generic parameter 'T' could not be inferred}}
33
33
34
34
let _ =E.foo("hello") // expected-error {{missing argument label 'bar:' in call}}
0 commit comments