Skip to content

Commit 10541ef

Browse files
committed
[AST] Concurrency: Strip existential if constrained type was stripped down to a class
`any C` where `C` is a class is not a well-formed type.
1 parent c06a1a8 commit 10541ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/AST/Type.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,9 @@ Type TypeBase::stripConcurrency(bool recurse, bool dropGlobalActor) {
996996
existentialType->getConstraintType().getPointer())
997997
return Type(this);
998998

999+
if (newConstraintType->getClassOrBoundGenericClass())
1000+
return newConstraintType;
1001+
9991002
return ExistentialType::get(newConstraintType);
10001003
}
10011004

0 commit comments

Comments
 (0)