mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CS] Use subclasses to expose locator element info
Instead of adding specific accessors directly to ConstraintLocator::PathElement, add subclasses that expose these accessors.
This commit is contained in:
@@ -1229,7 +1229,7 @@ ConstraintSystem::solveImpl(Expr *&expr,
|
||||
bool isForSingleExprFunction =
|
||||
getContextualTypePurpose() == CTP_ReturnSingleExpr;
|
||||
auto *convertTypeLocator = getConstraintLocator(
|
||||
expr, LocatorPathElt::getContextualType(isForSingleExprFunction));
|
||||
expr, LocatorPathElt::ContextualType(isForSingleExprFunction));
|
||||
|
||||
if (allowFreeTypeVariables == FreeTypeVariableBinding::UnresolvedType) {
|
||||
convertType = convertType.transform([&](Type type) -> Type {
|
||||
|
||||
Reference in New Issue
Block a user