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

Regression in selector interpolation #1074

Closed
xzyfer opened this issue Apr 8, 2015 · 1 comment · Fixed by #1076
Closed

Regression in selector interpolation #1074

xzyfer opened this issue Apr 8, 2015 · 1 comment · Fixed by #1076

Comments

@xzyfer
Copy link
Contributor

xzyfer commented Apr 8, 2015

The follow selector interpolation worked in 3.1.0 but fails with 3.2.0-beta.1 and above

$i: 1;
.foo#{-$i} { a:b }

3.2.0-beta.2 and above produce the following error

Error: invalid selector after .foo-
        on line 1 of test.scss

3.2.0-beta.1 also fails but reports a different line. A git bisect reports this regression was introduced in 7877cfa

The following variations work in all tested releases

$i: 1;
.foo-#{$i} { a:b }
.foo#{-1} { a:b }
.foo-#{1} { a:b }

Spec added sass/sass-spec#309

Can you take a look @mgreter ?

@mgreter
Copy link
Contributor

mgreter commented Apr 8, 2015

Error seems to happen in expand, since it seems to be parsed correctly:

String_Schema 0x2c322b0 (0@[0:6]-[1:0]) 4
 String_Quoted : 0x2a41dc0 (0@[0:6]-[1:0]) [.foo] <>
 Unary_Expression 0x2a41e40 (0@[0:6]-[0:7]) [1]
  operand: Variable 0x2c84be0 (0@[0:7]-[0:9]) [$i]

My guess is the unary expression is not correctly or not at all evaluated!
Edit: seems to be a problem in interpolation in eval.cpp (my bad).
Another usefull spec test discovered I would say ahem 😄

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

Successfully merging a pull request may close this issue.

2 participants