Skip to content

Commit 6cfa0b0

Browse files
committed
[Constraint system] Don't dereference a null member locator.
1 parent f6f80be commit 6cfa0b0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6068,6 +6068,7 @@ performMemberLookup(ConstraintKind constraintKind, DeclNameRef memberName,
60686068
// match, unwrap optionals and try again to allow implicit creation of
60696069
// optional "some" patterns (spelled "?").
60706070
if (result.ViableCandidates.empty() && result.UnviableCandidates.empty() &&
6071+
memberLocator &&
60716072
memberLocator->isLastElement<LocatorPathElt::PatternMatch>() &&
60726073
instanceTy->getOptionalObjectType() &&
60736074
baseObjTy->is<AnyMetatypeType>()) {

0 commit comments

Comments
 (0)