File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -304,9 +304,18 @@ Runtime.test("isBridgedVerbatimToObjectiveC") {
304304
305305//===----------------------------------------------------------------------===//
306306
307+ protocol SomeNativeProto { }
308+
307309class SomeClass { }
308310@objc class SomeObjCClass { }
309- class SomeNSObjectSubclass : NSObject { }
311+
312+ class SomeNSObjectSubclass : NSObject , SomeNativeProto { }
313+ extension SomeNativeProto {
314+ // https://github.com/apple/swift/issues/43154
315+ func expectSelfTypeNameEqual( to typeName: String ) {
316+ expectEqual ( typeName, _typeName ( type ( of: self ) ) )
317+ }
318+ }
310319
311320Runtime . test ( " typeName " ) {
312321 expectEqual ( " a.SomeObjCClass " , _typeName ( SomeObjCClass . self) )
@@ -321,6 +330,8 @@ Runtime.test("typeName") {
321330
322331 a = NSObject ( )
323332 expectEqual ( " NSObject " , _typeName ( type ( of: a) ) )
333+
334+ SomeNSObjectSubclass ( ) . expectSelfTypeNameEqual ( to: " a.SomeNSObjectSubclass " )
324335}
325336
326337class GenericClass < T> { }
@@ -571,7 +582,7 @@ Reflection.test("Class/ObjectiveCBase/Default") {
571582 expectEqual ( expected, output)
572583 }
573584}
574- protocol SomeNativeProto { }
585+
575586@objc protocol SomeObjCProto { }
576587extension SomeClass : SomeObjCProto { }
577588
You can’t perform that action at this time.
0 commit comments