Skip to content

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

@nex3

Description

@nex3

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);

   ------^

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions