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
_ =P.doesntExist // expected-error {{type 'P' has no member 'doesntExist'}}
145
-
_ =P.selfProp // expected-error {{generic parameter 'Self' could not be inferred}}
151
+
_ =P.selfProp // expected-error {{static member 'selfProp' cannot be used on protocol metatype 'P.Protocol'}}
146
152
_ =P.invalidProp
147
-
// expected-error@-1 {{cannot reference static property 'invalidProp' on 'P.Protocol' with non-conforming result type 'Int'}}
153
+
// expected-error@-1 {{static member 'invalidProp' cannot be used on protocol metatype 'P.Protocol'}}
148
154
_ =P.invalidProp.other
149
-
// expected-error@-1 {{cannot reference static property 'invalidProp' on 'P.Protocol' with non-conforming result type 'Int'}}
155
+
// expected-error@-1 {{static member 'invalidProp' cannot be used on protocol metatype 'P.Protocol'}}
150
156
// expected-error@-2 {{value of type 'Int' has no member 'other'}}
151
157
_ =P.invalidMethod // Partial application with an invalid base type
152
-
// expected-error@-1 {{cannot reference static method 'invalidMethod()' on 'P.Protocol' with non-conforming result type 'Int'}}
158
+
// expected-error@-1 {{static member 'invalidMethod' cannot be used on protocol metatype 'P.Protocol'}}
153
159
_ =P.invalidMethod()
154
-
// expected-error@-1 {{cannot reference static method 'invalidMethod()' on 'P.Protocol' with non-conforming result type 'Int'}}
160
+
// expected-error@-1 {{static member 'invalidMethod' cannot be used on protocol metatype 'P.Protocol'}}
155
161
_ =P.invalidMethod().other
156
-
// expected-error@-1 {{cannot reference static method 'invalidMethod()' on 'P.Protocol' with non-conforming result type 'Int'}}
162
+
// expected-error@-1 {{static member 'invalidMethod' cannot be used on protocol metatype 'P.Protocol'}}
157
163
// expected-error@-2 {{value of type 'Int' has no member 'other'}}
158
164
_ =P.generic(42)
159
-
// expected-error@-1 {{cannot reference static method 'generic' on 'P.Protocol' with non-conforming result type 'Int'}}
165
+
// expected-error@-1 {{static member 'generic' cannot be used on protocol metatype 'P.Protocol'}}
160
166
_ =P.generic(42).other
161
-
// expected-error@-1 {{cannot reference static method 'generic' on 'P.Protocol' with non-conforming result type 'Int'}}
167
+
// expected-error@-1 {{static member 'generic' cannot be used on protocol metatype 'P.Protocol'}}
162
168
// expected-error@-2 {{value of type 'Int' has no member 'other'}}
163
-
_ =P.generic(S()) // Ok
164
-
_ =P.generic(S()).other // Ok
165
-
_ =P.generic(G<Int>()) // Ok
166
-
_ =P.genericWithReqs([S()]) // Ok
169
+
_ =P.generic(S()) // expected-error {{static member 'generic' cannot be used on protocol metatype 'P.Protocol'}}
170
+
_ =P.generic(S()).other // expected-error {{static member 'generic' cannot be used on protocol metatype 'P.Protocol'}}
171
+
_ =P.generic(G<Int>()) // expected-error {{static member 'generic' cannot be used on protocol metatype 'P.Protocol'}}
172
+
_ =P.genericWithReqs([S()]) // expected-error {{static member 'genericWithReqs' cannot be used on protocol metatype 'P.Protocol'}}
167
173
_ =P.genericWithReqs([42])
168
-
// expected-error@-1 {{cannot reference static method 'genericWithReqs' on 'P.Protocol' with non-conforming result type 'Int'}}
174
+
// expected-error@-1 {{static member 'genericWithReqs' cannot be used on protocol metatype 'P.Protocol'}}
169
175
_ =P.genericWithReqs(())
170
176
// expected-error@-1 {{type '()' cannot conform to 'Collection'}} expected-note@-1 {{only concrete types such as structs, enums and classes can conform to protocols}}
171
-
// expected-error@-2 {{generic parameter 'Self' could not be inferred}}
177
+
// expected-error@-2 {{static member 'genericWithReqs' cannot be used on protocol metatype 'P.Protocol'}}
178
+
// expected-error@-3 {{generic parameter 'Q' could not be inferred}}
172
179
_ =P[q:""]
173
-
// expected-error@-1 {{cannot reference static subscript 'subscript(q:)' on 'P.Protocol' with non-conforming result type 'Int'}}
180
+
// expected-error@-1 {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
174
181
_ =P[q:""].other
175
-
// expected-error@-1 {{cannot reference static subscript 'subscript(q:)' on 'P.Protocol' with non-conforming result type 'Int'}}
182
+
// expected-error@-1 {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
176
183
// expected-error@-2 {{value of type 'Int' has no member 'other'}}
177
184
178
185
test(.doesntExist) // expected-error {{type 'P' has no member 'doesntExist'}}
_ =T1.staticExtensionFunc // expected-error {{cannot reference static method 'staticExtensionFunc(arg:)' on 'Whereable.Protocol' with non-conforming result type 'T1.Element'}}
56
+
_ =T1.staticExtensionFunc // expected-error {{static method 'staticExtensionFunc(arg:)' requires that 'T1' conform to 'Sequence'}}
57
57
_ =T2.staticExtensionFunc
58
58
59
59
t1.extensionFunc() // expected-error {{instance method 'extensionFunc()' requires the types 'T1.Assoc' and 'T1.Bssoc' be equivalent}}
0 commit comments