Skip to content

Commit 27ae04e

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

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
@@ -6285,7 +6285,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
62856285
// interfaces. Verifying that the underlying type of a
62866286
// protocol typealias is a constriant type is fundamentally
62876287
// circular, so the desugared type should be written in source.
6288-
if (Options.DesugarExistentialConstraint) {
6288+
if (Options.DesugarExistentialConstraint && !T->isAnyObject()) {
62896289
visit(T->getConstraintType()->getDesugaredType());
62906290
} else {
62916291
visit(T->getConstraintType());

0 commit comments

Comments
 (0)