Skip to content

Commit

Permalink
Merge pull request sass#1077 from mgreter/bugfix/issue_1075
Browse files Browse the repository at this point in the history
Fix argument handling for dynamic `call` function
  • Loading branch information
xzyfer committed Apr 8, 2015
2 parents 7ddfdd8 + 325b507 commit e60ad9a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1469,8 +1469,17 @@ namespace Sass {

Arguments* args = new (ctx.mem) Arguments(pstate);
for (size_t i = 0, L = arglist->length(); i < L; ++i) {
Argument* arg = new (ctx.mem) Argument(pstate, arglist->value_at_index(i));
*args << arg;
Expression* expr = arglist->value_at_index(i);
if (arglist->is_arglist()) {
Argument* arg = static_cast<Argument*>(expr);
*args << new (ctx.mem) Argument(pstate,
expr,
"",
arg->is_rest_argument(),
arg->is_keyword_argument());
} else {
*args << new (ctx.mem) Argument(pstate, expr);
}
}
Function_Call* func = new (ctx.mem) Function_Call(pstate, name, args);
Contextualize contextualize(ctx, &d_env, backtrace);
Expand Down

0 comments on commit e60ad9a

Please # to comment.