Skip to content

Commit 1b4178f

Browse files
committed
ASTScope: Fix llvm_unreachable when printing scopes before extension binding
1 parent cfa9de8 commit 1b4178f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/AST/ASTScope.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ SourceRange NominalTypeScope::getBraces() const { return decl->getBraces(); }
356356

357357
NullablePtr<NominalTypeDecl>
358358
ExtensionScope::getCorrespondingNominalTypeDecl() const {
359+
if (!decl->hasBeenBound())
360+
return nullptr;
359361
return decl->getExtendedNominal();
360362
}
361363

0 commit comments

Comments
 (0)