We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99e72b6 commit eb0b2bbCopy full SHA for eb0b2bb
test/expr/cast/metatype_casts.swift
@@ -49,3 +49,10 @@ use(C.self as P.Type) // expected-error{{cannot convert value of type 'C.Type' t
49
50
use(E.self as P.Protocol) // expected-error{{cannot convert value of type 'E.Type' to type 'P.Protocol' in coercion}}
51
use(E.self as P.Type)
52
+
53
+// SR-12946
54
+func SR12946<T>(_ e: T) {
55
+ _ = AnyObject.self is T.Type // OK
56
+}
57
58
+SR12946(1 as AnyObject)
0 commit comments