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

Don't segfault on & {} #1524

Closed
wants to merge 1 commit into from
Closed

Don't segfault on & {} #1524

wants to merge 1 commit into from

Conversation

saper
Copy link
Member

@saper saper commented Sep 3, 2015

Eases #1519

Now "& {}" just returns an empty CSS - whereas Ruby
reports:

Error: Base-level rules cannot contain the parent-selector-referencing character '&'.
        on line 1 of /home/saper/sw/nodes-sass-problems/1120/test.scss
  Use --trace for backtrace.

Another example:

foo {
  @extend &;
}

generates this error message:

Error: nested selectors may not be extended

whereas Ruby Sass gives:

Error: Can't extend &: can't extend parent selectors
        on line 2 of /home/saper/sw/nodes-sass-problems/1120/test1.scss
  Use --trace for backtrace.

@saper
Copy link
Member Author

saper commented Sep 3, 2015

I can't say I fully understand what shall Complex_Selector::parentize() return - I sense this method should fail in some cases right away.

This change just covers up the problem, probably.

@mgreter
Copy link
Contributor

mgreter commented Sep 3, 2015

This should be covered by #1527

@saper
Copy link
Member Author

saper commented Sep 3, 2015

Superseded by #1527

@saper saper closed this Sep 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants