do not match args with a variadic mixin that does not have enough arguments. Fixes #1527
This commit is contained in:
Родитель
0465398ab6
Коммит
58e3269c74
|
@ -225,7 +225,8 @@ tree.mixin.Definition.prototype = {
|
|||
if (! this.variadic) {
|
||||
if (argsLength < this.required) { return false; }
|
||||
if (argsLength > this.params.length) { return false; }
|
||||
if ((this.required > 0) && (argsLength > this.params.length)) { return false; }
|
||||
} else {
|
||||
if (argsLength < (this.required - 1)) { return false; }
|
||||
}
|
||||
|
||||
len = Math.min(argsLength, this.arity);
|
||||
|
|
|
@ -203,3 +203,13 @@ body {
|
|||
.selector3 {
|
||||
.mixin-comma-default3(4,2,2,2);
|
||||
}
|
||||
|
||||
.test-calling-one-arg-mixin(@a) {
|
||||
}
|
||||
|
||||
.test-calling-one-arg-mixin(@a, @b, @rest...) {
|
||||
}
|
||||
|
||||
div {
|
||||
.test-calling-one-arg-mixin(1);
|
||||
}
|
Загрузка…
Ссылка в новой задаче