Skip to content

Commit

Permalink
[CS] Remove a case from getStructuralTypeContext
Browse files Browse the repository at this point in the history
This was only needed for to handle tuple
construction, but is no longer needed now that we
retrieve the context info from the locator.
  • Loading branch information
hamishknight committed Jul 27, 2021
1 parent b3356b0 commit 7f1f092
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/Sema/CSFix.cpp
Expand Up @@ -428,14 +428,7 @@ getStructuralTypeContext(const Solution &solution, ConstraintLocator *locator) {
return std::make_tuple(CTP,
solution.getType(assignExpr->getSrc()),
solution.getType(assignExpr->getDest())->getRValueType());
} else if (auto *call = getAsExpr<CallExpr>(locator->getAnchor())) {
assert(isa<TypeExpr>(call->getFn()));
return std::make_tuple(
CTP_Initialization,
solution.getType(call->getFn())->getMetatypeInstanceType(),
solution.getType(call->getArg()));
}

return None;
}

Expand Down

0 comments on commit 7f1f092

Please sign in to comment.