Skip to content

Commit 14e0756

Browse files
committed
[CSApply] NFC: Simplify isOpenedAnyObject to check existential type
1 parent f7ce3e9 commit 14e0756

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Sema/CSApply.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ static bool isOpenedAnyObject(Type type) {
7777
if (!archetype || !archetype->isRoot())
7878
return false;
7979

80-
return (archetype->requiresClass() &&
81-
archetype->getConformsTo().empty() &&
82-
!archetype->getSuperclass());
80+
return archetype->getExistentialType()->isAnyObject();
8381
}
8482

8583
SubstitutionMap

0 commit comments

Comments
 (0)