mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #17729 from DougGregor/minimize-override-checking
[Type checker] Minimize checking needed to compute the set of overridden declarations
This commit is contained in:
@@ -2412,6 +2412,10 @@ static void configureDesignatedInitAttributes(TypeChecker &tc,
|
||||
ctor, {classDecl, superclassCtor}, ctx);
|
||||
}
|
||||
|
||||
// Wire up the overrides.
|
||||
ctor->getAttrs().add(new (ctx) OverrideAttr(/*IsImplicit=*/true));
|
||||
ctor->setOverriddenDecl(superclassCtor);
|
||||
|
||||
if (superclassCtor->isObjC()) {
|
||||
// Inherit the @objc name from the superclass initializer, if it
|
||||
// has one.
|
||||
@@ -2430,10 +2434,6 @@ static void configureDesignatedInitAttributes(TypeChecker &tc,
|
||||
ctor->getAttrs().add(new (ctx) RequiredAttr(/*IsImplicit=*/true));
|
||||
if (superclassCtor->isDynamic())
|
||||
ctor->getAttrs().add(new (ctx) DynamicAttr(/*IsImplicit*/true));
|
||||
|
||||
// Wire up the overrides.
|
||||
ctor->getAttrs().add(new (ctx) OverrideAttr(/*IsImplicit=*/true));
|
||||
ctor->setOverriddenDecl(superclassCtor);
|
||||
}
|
||||
|
||||
ConstructorDecl *
|
||||
|
||||
Reference in New Issue
Block a user