mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Constraint system] Don't dereference a null member locator.
This commit is contained in:
@@ -6068,6 +6068,7 @@ performMemberLookup(ConstraintKind constraintKind, DeclNameRef memberName,
|
||||
// match, unwrap optionals and try again to allow implicit creation of
|
||||
// optional "some" patterns (spelled "?").
|
||||
if (result.ViableCandidates.empty() && result.UnviableCandidates.empty() &&
|
||||
memberLocator &&
|
||||
memberLocator->isLastElement<LocatorPathElt::PatternMatch>() &&
|
||||
instanceTy->getOptionalObjectType() &&
|
||||
baseObjTy->is<AnyMetatypeType>()) {
|
||||
|
||||
Reference in New Issue
Block a user