Skip to content

Throw an error for a member reference that refers to different members over time #99

@nex3

Description

@nex3

With @import, it's possible for a file to refer to a mixin or function that gets redefined later on. Right now References will just override the previous definition and treat it as though it always referred to whatever the last value was, but the more correct behavior would be to throw an error, since changing the definition isn't supported in the module system.

For example:

<==> input/entrypoint.scss
@import "definition1";
@import "upstream";
@import "midstream";

<==> input/definition1.scss
@function fn() {@return 1}

<==> input/definition2.scss
@function fn() {@return 2}

<==> input/midstream.scss
@import "definition2";
@import "upstream";

<==> input/upstream.scss
a {b: fn()}

I don't think this is worth fixing before we launch, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmodule systemPart of the module system migrator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions