Skip to content

Commit bfdc2c7

Browse files
committed
[CS] Change openedType -> openedFullType in a couple of cases
This helps avoid confusion with SelectedOverload's `openedType` member.
1 parent aa3e2d5 commit bfdc2c7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/Sema/CSApply.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ namespace {
384384

385385
public:
386386
/// Build a reference to the given declaration.
387-
Expr *buildDeclRef(OverloadChoice choice, DeclNameLoc loc, Type openedType,
388-
ConstraintLocatorBuilder locator, bool implicit,
389-
AccessSemantics semantics) {
387+
Expr *buildDeclRef(OverloadChoice choice, DeclNameLoc loc,
388+
Type openedFullType, ConstraintLocatorBuilder locator,
389+
bool implicit, AccessSemantics semantics) {
390390
assert(choice.getKind() != OverloadChoiceKind::DeclViaDynamic);
391391
auto *decl = choice.getDecl();
392392

@@ -398,7 +398,7 @@ namespace {
398398
if (decl->getDeclContext()->isTypeContext() && isa<FuncDecl>(decl)) {
399399
assert(cast<FuncDecl>(decl)->isOperator() && "Must be an operator");
400400

401-
auto openedFnType = openedType->castTo<FunctionType>();
401+
auto openedFnType = openedFullType->castTo<FunctionType>();
402402
auto simplifiedFnType
403403
= simplifyType(openedFnType)->castTo<FunctionType>();
404404
auto baseTy = getBaseType(simplifiedFnType);
@@ -463,12 +463,12 @@ namespace {
463463
TypeExpr::createImplicitHack(loc.getBaseNameLoc(), baseTy, ctx);
464464
cs.cacheExprTypes(base);
465465

466-
return buildMemberRef(base, openedType, SourceLoc(), choice, loc,
466+
return buildMemberRef(base, openedFullType, SourceLoc(), choice, loc,
467467
openedFnType->getResult(), locator, locator,
468468
implicit, semantics);
469469
}
470470

471-
auto type = solution.simplifyType(openedType);
471+
auto type = solution.simplifyType(openedFullType);
472472

473473
if (isa<TypeDecl>(decl) && !isa<ModuleDecl>(decl)) {
474474
auto typeExpr = TypeExpr::createImplicitHack(
@@ -2511,15 +2511,15 @@ namespace {
25112511
Expr *applyCtorRefExpr(Expr *expr, Expr *base, SourceLoc dotLoc,
25122512
DeclNameLoc nameLoc, bool implicit,
25132513
ConstraintLocator *ctorLocator,
2514-
OverloadChoice choice, Type openedType) {
2514+
OverloadChoice choice, Type openedFullType) {
25152515
assert(choice.getKind() != OverloadChoiceKind::DeclViaDynamic);
25162516
auto *ctor = cast<ConstructorDecl>(choice.getDecl());
25172517

25182518
// If the subexpression is a metatype, build a direct reference to the
25192519
// constructor.
25202520
if (cs.getType(base)->is<AnyMetatypeType>()) {
25212521
return buildMemberRef(
2522-
base, openedType, dotLoc, choice, nameLoc, cs.getType(expr),
2522+
base, openedFullType, dotLoc, choice, nameLoc, cs.getType(expr),
25232523
ConstraintLocatorBuilder(cs.getConstraintLocator(expr)),
25242524
ctorLocator, implicit, AccessSemantics::Ordinary);
25252525
}
@@ -2565,7 +2565,7 @@ namespace {
25652565

25662566
// Build a partial application of the delegated initializer.
25672567
auto callee = resolveConcreteDeclRef(ctor, ctorLocator);
2568-
Expr *ctorRef = buildOtherConstructorRef(openedType, callee, base,
2568+
Expr *ctorRef = buildOtherConstructorRef(openedFullType, callee, base,
25692569
nameLoc, ctorLocator, implicit);
25702570
auto *call = new (cs.getASTContext()) DotSyntaxCallExpr(ctorRef, dotLoc,
25712571
base);

0 commit comments

Comments
 (0)