Skip to content

Commit c7eda8a

Browse files
authored
Merge pull request #65883 from slavapestov/astscope-test
Fix and re-enable bitrotted ASTScope test
2 parents 541c5d3 + 0e465de commit c7eda8a

File tree

2 files changed

+202
-240
lines changed

2 files changed

+202
-240
lines changed

lib/AST/ASTScopePrinting.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,10 @@ NullablePtr<const void> ASTScopeImpl::addressForPrinting() const {
148148
void GenericTypeOrExtensionScope::printSpecifics(llvm::raw_ostream &out) const {
149149
if (shouldHaveABody() && !doesDeclHaveABody())
150150
out << "<no body>";
151-
// Sadly, the following can trip assertions
152-
// else if (auto *n = getCorrespondingNominalTypeDecl().getPtrOrNull())
153-
// out << "'" << n->getFullName() << "'";
154-
// else
155-
// out << "<no extended nominal?!>";
151+
else if (auto *n = getCorrespondingNominalTypeDecl().getPtrOrNull())
152+
out << "'" << n->getName() << "'";
153+
else
154+
out << "<no extended nominal?!>";
156155
}
157156

158157
void GenericParamScope::printSpecifics(llvm::raw_ostream &out) const {

0 commit comments

Comments
 (0)