mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Differentiate between 'class is @objc' and 'class has implicitly @objc members'
Generic subclasses of @objc classes are thus no longer @objc, but still have implicitly @objc members. Explicit @objc on generic classes or classes that inherit from @objc classes is now forbidden with a diagnostic. Users need to know that while they can override Objective-C methods and properties in such a class, they cannot refer to the class by name from Objective-C code, since it will not appear in the bridging header. Fixes <rdar://problem/21342574>. Swift SVN r30494
This commit is contained in:
@@ -2296,7 +2296,7 @@ void TypeChecker::addImplicitDestructor(ClassDecl *CD) {
|
||||
|
||||
DD->setImplicit();
|
||||
|
||||
// Type-check the constructor declaration.
|
||||
// Type-check the destructor declaration.
|
||||
typeCheckDecl(DD, /*isFirstPass=*/true);
|
||||
|
||||
// Create an empty body for the destructor.
|
||||
|
||||
Reference in New Issue
Block a user