Skip to content

Commit d25be61

Browse files
authored
Merge pull request #83389 from xedin/rdar-156896331
[AST] TypeSubstitution: Add a `nullptr` check before attempting to us…
2 parents 04852d0 + e5b1f7b commit d25be61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/AST/TypeSubstitution.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,8 @@ operator()(InFlightSubstitution &IFS, Type maybeOpaqueType,
11571157
auto inContext = this->getContext();
11581158
auto isContextWholeModule = this->isWholeModule();
11591159
auto contextExpansion = this->contextExpansion;
1160-
if (partialSubstTy.findIf(
1160+
if (inContext &&
1161+
partialSubstTy.findIf(
11611162
[inContext, substitutionKind, isContextWholeModule,
11621163
contextExpansion](Type t) -> bool {
11631164
if (!canSubstituteTypeInto(t, inContext, substitutionKind,

0 commit comments

Comments
 (0)