-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Error if function reference that refers to other function over time
- Loading branch information
1 parent
dce67db
commit 402e6f5
Showing
4 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
test/migrators/module/references/different_reference_same_function.hrx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<==> input/entrypoint.scss | ||
@import "definition1"; | ||
@import "upstream"; | ||
@import "direct"; | ||
|
||
<==> input/_direct.scss | ||
@import "definition2"; | ||
@import "upstream"; | ||
|
||
<==> input/definition1.scss | ||
@function fn() {@return 1} | ||
|
||
<==> input/definition2.scss | ||
@function fn() {@return 2} | ||
|
||
<==> input/upstream.scss | ||
a { b: fn() } | ||
|
||
<==> error.txt | ||
Error: Function `fn` has been previously declared in definition1.scss and is later on defined in definition2.scss. | ||
Migration failed! |
27 changes: 27 additions & 0 deletions
27
test/migrators/module/references/different_reference_same_mixin.hrx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<==> input/entrypoint.scss | ||
@import "definition1"; | ||
@import "upstream"; | ||
@import "direct"; | ||
|
||
<==> input/_direct.scss | ||
@import "definition2"; | ||
@import "upstream"; | ||
|
||
<==> input/definition1.scss | ||
@mixin fn { | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
} | ||
|
||
<==> input/definition2.scss | ||
@mixin fn { | ||
color: blue; | ||
} | ||
|
||
<==> input/upstream.scss | ||
@include fn; | ||
|
||
<==> error.txt | ||
Error: Mixin `fn` has been previously declared in definition1.scss and is later on defined in definition2.scss. | ||
Migration failed! |