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

get-function() doesn't see functions defined in inner scopes #2830

Open
nex3 opened this issue Feb 16, 2019 · 2 comments
Open

get-function() doesn't see functions defined in inner scopes #2830

nex3 opened this issue Feb 16, 2019 · 2 comments
Labels
Bug - Confirmed Compatibility - P3 Minorly important for compatibility with the Sass spec and ecosystem Dart Backport Done Dev - Test Written

Comments

@nex3
Copy link
Contributor

nex3 commented Feb 16, 2019

LibSass's get-function() function fails if it's passed a function name that's defined only in a nested scope. For example:

.scope {
  @function add-two($v) {@return $v + 2}
  $_: get-function(add-two);
}

This throws:

Error: Function not found: add-two
        on line 3:7 of test.scss, in function `get-function`
        from line 3:7 of test.scss
>>   $_: get-function(add-two);

   ------^
@nex3
Copy link
Contributor Author

nex3 commented Feb 16, 2019

I'm adding a spec for this in sass/sass-spec#1345.

xzyfer added a commit that referenced this issue Mar 17, 2019
This fixes the error reported in #2830 but it appears there is a
general issue using `call` with the result of `get-function`.
@xzyfer
Copy link
Contributor

xzyfer commented Mar 17, 2019

I have a fix for the error reported (#2846) but not the underlying issue of executing scoped function references.

Until the behavioural issue is resolved erring is better than producing broken output.

@nex3 nex3 added the Compatibility - P3 Minorly important for compatibility with the Sass spec and ecosystem label Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug - Confirmed Compatibility - P3 Minorly important for compatibility with the Sass spec and ecosystem Dart Backport Done Dev - Test Written
Projects
None yet
Development

No branches or pull requests

3 participants