mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Diagnose redeclarations of Objective-C methods.
@objc methods, initializers, deinitializers, properties, and subscripts all produce Objective-C methods. Diagnose cases where two such entities (which may be of different kinds) produce the same Objective-C method in the same class. As a special exception, one can have an Objective-C method in an extension that conflicts with an Objective-C method in the original class definition, so long as the original class definition is from a different model. This reflects the reality in Objective-C that the category definition wins over the original definition, and is used in at least one overlay (SpriteKit). This is the first part of rdar://problem/18391046; the second part involves checking that overrides are sane. Swift SVN r23147
This commit is contained in:
@@ -51,7 +51,7 @@ const uint16_t VERSION_MAJOR = 0;
|
||||
/// To ensure that two separate changes don't silently get merged into one
|
||||
/// in source control, you should also update the comment to briefly
|
||||
/// describe what change you made.
|
||||
const uint16_t VERSION_MINOR = 157; // Last change: support nil in witness method entry
|
||||
const uint16_t VERSION_MINOR = 158; // Last change: objc decl attribute
|
||||
|
||||
using DeclID = Fixnum<31>;
|
||||
using DeclIDField = BCFixed<31>;
|
||||
@@ -1133,6 +1133,7 @@ namespace decls_block {
|
||||
using ObjCDeclAttrLayout = BCRecordLayout<
|
||||
ObjC_DECL_ATTR,
|
||||
BCFixed<1>, // implicit flag
|
||||
BCFixed<1>, // implicit name flag
|
||||
BCVBR<4>, // # of arguments (+1) or zero if no name
|
||||
BCArray<IdentifierIDField>
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user