@@ -384,9 +384,9 @@ namespace {
384
384
385
385
public:
386
386
// / 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) {
390
390
assert (choice.getKind () != OverloadChoiceKind::DeclViaDynamic);
391
391
auto *decl = choice.getDecl ();
392
392
@@ -398,7 +398,7 @@ namespace {
398
398
if (decl->getDeclContext ()->isTypeContext () && isa<FuncDecl>(decl)) {
399
399
assert (cast<FuncDecl>(decl)->isOperator () && " Must be an operator" );
400
400
401
- auto openedFnType = openedType ->castTo <FunctionType>();
401
+ auto openedFnType = openedFullType ->castTo <FunctionType>();
402
402
auto simplifiedFnType
403
403
= simplifyType (openedFnType)->castTo <FunctionType>();
404
404
auto baseTy = getBaseType (simplifiedFnType);
@@ -463,12 +463,12 @@ namespace {
463
463
TypeExpr::createImplicitHack (loc.getBaseNameLoc (), baseTy, ctx);
464
464
cs.cacheExprTypes (base);
465
465
466
- return buildMemberRef (base, openedType , SourceLoc (), choice, loc,
466
+ return buildMemberRef (base, openedFullType , SourceLoc (), choice, loc,
467
467
openedFnType->getResult (), locator, locator,
468
468
implicit, semantics);
469
469
}
470
470
471
- auto type = solution.simplifyType (openedType );
471
+ auto type = solution.simplifyType (openedFullType );
472
472
473
473
if (isa<TypeDecl>(decl) && !isa<ModuleDecl>(decl)) {
474
474
auto typeExpr = TypeExpr::createImplicitHack (
@@ -2511,15 +2511,15 @@ namespace {
2511
2511
Expr *applyCtorRefExpr (Expr *expr, Expr *base, SourceLoc dotLoc,
2512
2512
DeclNameLoc nameLoc, bool implicit,
2513
2513
ConstraintLocator *ctorLocator,
2514
- OverloadChoice choice, Type openedType ) {
2514
+ OverloadChoice choice, Type openedFullType ) {
2515
2515
assert (choice.getKind () != OverloadChoiceKind::DeclViaDynamic);
2516
2516
auto *ctor = cast<ConstructorDecl>(choice.getDecl ());
2517
2517
2518
2518
// If the subexpression is a metatype, build a direct reference to the
2519
2519
// constructor.
2520
2520
if (cs.getType (base)->is <AnyMetatypeType>()) {
2521
2521
return buildMemberRef (
2522
- base, openedType , dotLoc, choice, nameLoc, cs.getType (expr),
2522
+ base, openedFullType , dotLoc, choice, nameLoc, cs.getType (expr),
2523
2523
ConstraintLocatorBuilder (cs.getConstraintLocator (expr)),
2524
2524
ctorLocator, implicit, AccessSemantics::Ordinary);
2525
2525
}
@@ -2565,7 +2565,7 @@ namespace {
2565
2565
2566
2566
// Build a partial application of the delegated initializer.
2567
2567
auto callee = resolveConcreteDeclRef (ctor, ctorLocator);
2568
- Expr *ctorRef = buildOtherConstructorRef (openedType , callee, base,
2568
+ Expr *ctorRef = buildOtherConstructorRef (openedFullType , callee, base,
2569
2569
nameLoc, ctorLocator, implicit);
2570
2570
auto *call = new (cs.getASTContext ()) DotSyntaxCallExpr (ctorRef, dotLoc,
2571
2571
base);
0 commit comments