mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Runtime] Correctly match demangle tree for generic Objective-C classes.
When we encounter the demangle tree for a bound generic class type, look through the "Type" node of the child tree before checking whether we have an Objective-C class name. If we do have an Objective-C class name, there is no way to preserve the generic arguments, so we ignore them and return the (non-generic) class type. Fixes rdar://problem/47028102.
This commit is contained in:
@@ -108,5 +108,9 @@ DemangleToMetadataTests.test("runtime conformance check for @objc protocol inher
|
||||
expectEqual(F<P3>.self, _typeByName("4main1FCyAA2P3PG")!)
|
||||
}
|
||||
|
||||
DemangleToMetadataTests.test("Objective-C generics") {
|
||||
expectEqual(NSArray.self, _typeByName("So7NSArrayCySo8NSStringCG")!)
|
||||
}
|
||||
|
||||
runAllTests()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user