mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Rework handling of object literal expressions
Instead of special casing argument-to-parameter matching for object literal expressions, let's allow constraint system to lookup a witness initializer and apply it to the given set of arguments. This also simplifies constraint application because `coerceCallArguments` could be used to form type-checked argument expression.
This commit is contained in:
@@ -6754,7 +6754,7 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
|
||||
return SolutionKind::Solved;
|
||||
} else if ((kind == ConstraintKind::ValueMember ||
|
||||
kind == ConstraintKind::ValueWitness) &&
|
||||
baseObjTy->isHole()) {
|
||||
baseObjTy->getMetatypeInstanceType()->isHole()) {
|
||||
// If base type is a "hole" there is no reason to record any
|
||||
// more "member not found" fixes for chained member references.
|
||||
markMemberTypeAsPotentialHole(memberTy);
|
||||
|
||||
Reference in New Issue
Block a user