We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6796c86 + 120d8eb commit f1c9e06Copy full SHA for f1c9e06
bind.cpp
@@ -28,14 +28,22 @@ namespace Sass {
28
size_t ip = 0, LP = ps->length();
29
size_t ia = 0, LA = as->length();
30
while (ia < LA) {
31
+ Argument* a = (*as)[ia];
32
if (ip >= LP) {
33
+ // skip empty rest arguments
34
+ if (a->is_rest_argument()) {
35
+ if (List* l = dynamic_cast<List*>(a->value())) {
36
+ if (l->length() == 0) {
37
+ ++ ia; continue;
38
+ }
39
40
41
stringstream msg;
42
msg << callee << " only takes " << LP << " arguments; "
43
<< "given " << LA;
44
error(msg.str(), as->pstate());
45
}
46
Parameter* p = (*ps)[ip];
- Argument* a = (*as)[ia];
47
48
// If the current parameter is the rest parameter, process and break the loop
49
if (p->is_rest_parameter()) {
0 commit comments