cloudhead/less.js — Issue #666: Weird arity matching behaviour
Author: Daniel15
Created: 2012-02-27 10:43:25+00:00
State: open

Given this CSS:

```css
.hello(@foo)
{
foo: @foo;
}

.hello(@foo, @bar)
{
secondfoo: @foo;
secondbar: @bar;
}

.first
{
.hello(1px);
}

.second
{
.hello(2px, 3px);
}
```

It compiles as expected:

```css
.first {
foo: 1px;
}
.second {
secondfoo: 2px;
secondbar: 3px;
}
```

However, if you specify a default for the first parameter:

```css
.hello(@foo: 100px)
{
foo: @foo;
}

.hello(@foo, @bar)
{
secondfoo: @foo;
secondbar: @bar;
}

.first
{
.hello(1px);
}

.second
{
.hello(2px, 3px);
}
```

It gets compiled as the following:

```css
.first {
foo: 1px;
}
.second {
foo: 2px;
secondfoo: 2px;
secondbar: 3px;
}
```

Is this expected?