Skip to content

Commit

Permalink
[IDE] Fix a crash trying to get the extended type of an ExtensionDecl…
Browse files Browse the repository at this point in the history
… with an un-typechecked AST.

Regression test on SourceKit side.

This addresses <rdar://problem/17999105>.

Swift SVN r21161
  • Loading branch information
sonnyfalk committed Aug 13, 2014
1 parent 0152349 commit 372ea11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/IDE/SourceEntityWalker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 372ea11

Please sign in to comment.