Skip to content

Commit a8d162f

Browse files
committed
Fix crash by checking if nominal type is null
1 parent d6117a4 commit a8d162f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ SILCombiner::buildConcreteOpenedExistentialInfoFromSoleConformingType(
904904
(archetypeTy->getConformsTo().size() == 1)) {
905905
PD = archetypeTy->getConformsTo()[0];
906906
} else if (ArgType.isExistentialType() && !ArgType.isAnyObject() &&
907-
!SwiftArgType->isAny()) {
907+
!SwiftArgType->isAny() && SwiftArgType->getAnyNominal()) {
908908
PD = dyn_cast<ProtocolDecl>(SwiftArgType->getAnyNominal());
909909
}
910910
}

0 commit comments

Comments
 (0)