Skip to content

Commit 8e5dbcf

Browse files
authored
Merge pull request swiftlang#23921 from xedin/dynamic-member-implicit-ast
[CSApply] Mark dynamic member lookup subscript expr and its argument …
2 parents a316fa9 + cf09a4e commit 8e5dbcf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/Sema/CSApply.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2863,18 +2863,16 @@ namespace {
28632863
auto tupleTy =
28642864
TupleType::get(TupleTypeElt(paramTy, ctx.Id_dynamicMember), ctx);
28652865

2866-
auto loc = nameLoc;
2867-
Expr *index = TupleExpr::create(ctx, loc, argExpr, ctx.Id_dynamicMember,
2868-
loc, loc, /*hasTrailingClosure*/ false,
2869-
/*implicit*/ true);
2866+
Expr *index =
2867+
TupleExpr::createImplicit(ctx, argExpr, ctx.Id_dynamicMember);
28702868
index->setType(tupleTy);
28712869
cs.cacheType(index);
28722870

28732871
// Build and return a subscript that uses this string as the index.
28742872
return buildSubscript(
28752873
base, index, ctx.Id_dynamicMember,
28762874
/*trailingClosure*/ false, cs.getConstraintLocator(expr),
2877-
/*isImplicit*/ false, AccessSemantics::Ordinary, overload);
2875+
/*isImplicit*/ true, AccessSemantics::Ordinary, overload);
28782876
}
28792877

28802878
Type getTypeOfDynamicMemberIndex(const SelectedOverload &overload) {

0 commit comments

Comments
 (0)