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
enumX7<T>where X7.X :G{case X } // expected-error{{enum case 'X' is not a member type of 'X7<T>'}}
247
247
// expected-error@-1{{cannot find type 'G' in scope}}
248
248
249
+
// Test that contextual type resolution for generic metatypes is consistent
250
+
// under a same-type constraint.
249
251
protocolMetatypeTypeResolutionProto{}
250
252
structX8<T>{
251
253
staticvarproperty1:T.Type{T.self }
252
254
staticfunc method1()->T.Type{T.self }
253
255
}
254
256
extensionX8where T ==MetatypeTypeResolutionProto{
255
-
// FIXME: Inconsistent contextual type resolution for generic metatypes;
256
-
// should be .Protocol in both cases.
257
-
staticvarproperty2:T.Type{ property1 }
258
-
// expected-error@-1 {{cannot convert return expression of type 'MetatypeTypeResolutionProto.Protocol' to return type 'MetatypeTypeResolutionProto.Type'}}
259
-
staticfunc method2()->T.Type{method1()} // ok
257
+
staticvarproperty2:T.Type{ property1 } // ok, still .Protocol
258
+
staticfunc method2()->T.Type{method1()} // ok, still .Protocol
0 commit comments