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.
1 parent efa6496 commit b8cf94cCopy full SHA for b8cf94c
src/eval.cpp
@@ -827,8 +827,15 @@ namespace Sass {
827
828
if (def->is_overload_stub()) {
829
std::stringstream ss;
830
- ss << full_name
831
- << args->length();
+ size_t L = args->length();
+ // account for rest arguments
832
+ if (args->has_rest_argument() && args->length() > 0) {
833
+ // get the rest arguments list
834
+ List* rest = dynamic_cast<List*>(args->last()->value());
835
+ // arguments before rest argument plus rest
836
+ if (rest) L += rest->length() - 1;
837
+ }
838
+ ss << full_name << L;
839
full_name = ss.str();
840
std::string resolved_name(full_name);
841
if (!env->has(resolved_name)) error("overloaded function `" + std::string(c->name()) + "` given wrong number of arguments", c->pstate());
0 commit comments