Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parametric mixins: parameters don't match error #2645

Closed
edwardcoolson opened this issue Jul 20, 2015 · 1 comment
Closed

Parametric mixins: parameters don't match error #2645

edwardcoolson opened this issue Jul 20, 2015 · 1 comment

Comments

@edwardcoolson
Copy link

Hi guys,

I have this code that don't compile. The compiler issues "Wrong number of arguments..." error message:

.mixin(@height) {
  height: @height;
}

.mixin(@width, @height: 10px) {
  width: @width;

  .mixin(@height: @height);
}

// mixin call
div {
  .mixin(@height: 20px);
}

I call the mixin with a single named parameters, the first mixin shall match but it does not. For some reason the compiler tries to match the second and not the first as if the first does not exist. If I comment the second, the first begins to work.

What is wrong with this code?

@seven-phases-max
Copy link
Member

Confirmed. The code indeed is valid but the second mixin throws its error w/o taking into that there're other matching mixins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants