Skip to content

Commit e60ad9a

Browse files
committed
Merge pull request #1077 from mgreter/bugfix/issue_1075
Fix argument handling for dynamic `call` function
2 parents 7ddfdd8 + 325b507 commit e60ad9a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

functions.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,8 +1469,17 @@ namespace Sass {
14691469

14701470
Arguments* args = new (ctx.mem) Arguments(pstate);
14711471
for (size_t i = 0, L = arglist->length(); i < L; ++i) {
1472-
Argument* arg = new (ctx.mem) Argument(pstate, arglist->value_at_index(i));
1473-
*args << arg;
1472+
Expression* expr = arglist->value_at_index(i);
1473+
if (arglist->is_arglist()) {
1474+
Argument* arg = static_cast<Argument*>(expr);
1475+
*args << new (ctx.mem) Argument(pstate,
1476+
expr,
1477+
"",
1478+
arg->is_rest_argument(),
1479+
arg->is_keyword_argument());
1480+
} else {
1481+
*args << new (ctx.mem) Argument(pstate, expr);
1482+
}
14741483
}
14751484
Function_Call* func = new (ctx.mem) Function_Call(pstate, name, args);
14761485
Contextualize contextualize(ctx, &d_env, backtrace);

0 commit comments

Comments
 (0)