mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[IDE] Fix a crash trying to get the extended type of an ExtensionDecl with an un-typechecked AST.
Regression test on SourceKit side. This addresses <rdar://problem/17999105>. Swift SVN r21161
This commit is contained in:
@@ -122,7 +122,7 @@ bool SemaAnnotator::walkToDeclPre(Decl *D) {
|
||||
NameLen = VD->getName().getLength();
|
||||
|
||||
} else if (ExtensionDecl *ED = dyn_cast<ExtensionDecl>(D)) {
|
||||
if (!ED->isInvalid()) {
|
||||
if (!ED->isInvalid() && ED->getExtendedType()) {
|
||||
// FIXME: Handle all of the ref-components in extensions, as well as
|
||||
// the generic parameter lists.
|
||||
if (auto nominal = ED->getExtendedType()->getAnyNominal()) {
|
||||
|
||||
Reference in New Issue
Block a user