Sema: Kill off old modeling of generic arguments

This commit is contained in:
Slava Pestov
2017-05-24 19:41:25 -07:00
parent fd80aa096e
commit 1b254a9843
18 changed files with 29 additions and 174 deletions

View File

@@ -1019,8 +1019,7 @@ namespace {
CS.getConstraintLocator(expr, ConstraintLocator::Member);
auto tv = CS.createTypeVariable(memberLocator, TVO_CanBindToLValue);
OverloadChoice choice(CS.getType(base), decl, /*isSpecialized=*/false,
functionRefKind);
OverloadChoice choice(CS.getType(base), decl, functionRefKind);
auto locator = CS.getConstraintLocator(expr, ConstraintLocator::Member);
CS.addBindOverloadConstraint(tv, choice, locator, CurDC);
return tv;
@@ -1121,8 +1120,7 @@ namespace {
// a known subscript here. This might be cleaner if we split off a new
// UnresolvedSubscriptExpr from SubscriptExpr.
if (auto decl = declOrNull) {
OverloadChoice choice(baseTy, decl, /*isSpecialized=*/false,
FunctionRefKind::DoubleApply);
OverloadChoice choice(baseTy, decl, FunctionRefKind::DoubleApply);
CS.addBindOverloadConstraint(fnTy, choice, memberLocator,
CurDC);
} else {
@@ -1314,7 +1312,6 @@ namespace {
auto tv = CS.createTypeVariable(locator, TVO_CanBindToLValue);
CS.resolveOverload(locator, tv,
OverloadChoice(Type(), E->getDecl(),
E->isSpecialized(),
E->getFunctionRefKind()),
CurDC);
@@ -1391,7 +1388,6 @@ namespace {
continue;
choices.push_back(OverloadChoice(Type(), decls[i],
expr->isSpecialized(),
expr->getFunctionRefKind()));
}