Skip to content

Commit dd62ccd

Browse files
authored
Merge pull request #34326 from DougGregor/type-eraser-resolution
2 parents faa6289 + 2a3f4f6 commit dd62ccd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AST/Attr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,8 +986,8 @@ bool DeclAttribute::printImpl(ASTPrinter &Printer, const PrintOptions &Options,
986986
auto *attr = cast<TypeEraserAttr>(this);
987987
if (auto *repr = attr->getParsedTypeEraserTypeRepr())
988988
repr->print(Printer, Options);
989-
else
990-
attr->getTypeWithoutResolving()->print(Printer, Options);
989+
else if (auto proto = dyn_cast<ProtocolDecl>(D))
990+
attr->getResolvedType(proto)->print(Printer, Options);
991991
Printer.printNamePost(PrintNameContext::Attribute);
992992
Printer << ")";
993993
break;

0 commit comments

Comments
 (0)