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/decl/protocol/req/missing_conformance.swift
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,15 @@ struct S4: P13 { // expected-error {{type 'S4' does not conform to protocol 'P13
119
119
// expected-note@-1 {{cannot infer 'A' = 'P11' because 'P11' as a type cannot conform to protocols; did you mean to use an opaque result type?}}{{12-12=some }}
120
120
}
121
121
122
+
protocolP14{
123
+
associatedtypeA:P11 // expected-note {{unable to infer associated type 'A' for protocol 'P14'}}
124
+
subscript(i:Int)->A{get}
125
+
}
126
+
structS5:P14{ // expected-error {{type 'S5' does not conform to protocol 'P14'}}
127
+
subscript(i:Int)->P11{return i }
128
+
// expected-note@-1 {{cannot infer 'A' = 'P11' because 'P11' as a type cannot conform to protocols; did you mean to use an opaque result type?}}{{24-24=some }}
0 commit comments