mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Allow '@objc(RuntimeName)' on classes with generic ancestry.
This is accomplished by recognizing this specific situation and replacing the 'objc' attribute with a hidden '_objcRuntimeName' attribute. This /only/ applies to classes that are themselves non-generic (including any enclosing generic context) but that have generic ancestry, and thus cannot be exposed directly to Objective-C. This commit also eliminates '@NSKeyedArchiverClassName'. It was decided that the distinction between '@NSKeyedArchiverClassName' and '@objc' was too subtle to be worth explaining to developers, and that any case where you'd use '@NSKeyedArchiverClassName' was already a place where the ObjC name wasn't visible at compile time. This commit does not update diagnostics to reflect this change; we're going to change them anyway. rdar://problem/32414557
This commit is contained in:
@@ -1321,8 +1321,8 @@ namespace decls_block {
|
||||
using SynthesizedProtocolDeclAttrLayout
|
||||
= BCRecordLayout<SynthesizedProtocol_DECL_ATTR>;
|
||||
using ImplementsDeclAttrLayout = BCRecordLayout<Implements_DECL_ATTR>;
|
||||
using NSKeyedArchiverClassNameDeclAttrLayout
|
||||
= BCRecordLayout<NSKeyedArchiverClassName_DECL_ATTR>;
|
||||
using ObjCRuntimeNameDeclAttrLayout
|
||||
= BCRecordLayout<ObjCRuntimeName_DECL_ATTR>;
|
||||
|
||||
using InlineDeclAttrLayout = BCRecordLayout<
|
||||
Inline_DECL_ATTR,
|
||||
|
||||
Reference in New Issue
Block a user