Skip to content

Commit 27d4f94

Browse files
committed
[ASTPrinter] Don't desugar AnyObject existentials in Swift interfaces.
1 parent a8b1890 commit 27d4f94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/ASTPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6224,7 +6224,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
62246224
// interfaces. Verifying that the underlying type of a
62256225
// protocol typealias is a constriant type is fundamentally
62266226
// circular, so the desugared type should be written in source.
6227-
if (Options.DesugarExistentialConstraint) {
6227+
if (Options.DesugarExistentialConstraint && !T->isAnyObject()) {
62286228
visit(T->getConstraintType()->getDesugaredType());
62296229
} else {
62306230
visit(T->getConstraintType());

0 commit comments

Comments
 (0)