-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
print polyvar tag names in ReScript syntax (#6348)
* print polyvar tag names in ReScript syntax * changelog * make reanalyze happy
- Loading branch information
Showing
11 changed files
with
40 additions
and
8 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
13 changes: 13 additions & 0 deletions
13
jscomp/build_tests/super_errors/expected/polyvariant_name_formatting.res.expected
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,13 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/polyvariant_name_formatting.res[0m:[2m6:3-10[0m | ||
|
||
4 [2m│[0m | ||
5 [2m│[0m switch f { | ||
[1;31m6[0m [2m│[0m | [1;31m#Invalid[0m => () | ||
7 [2m│[0m } | ||
8 [2m│[0m | ||
|
||
This pattern matches values of type [1;31m[? #Invalid][0m | ||
but a pattern was expected which matches values of type [1;33mpolyvariant[0m | ||
The second variant type does not allow tag(s) #Invalid |
7 changes: 7 additions & 0 deletions
7
jscomp/build_tests/super_errors/fixtures/polyvariant_name_formatting.res
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,7 @@ | ||
type polyvariant = [#Error(string) | #Valid] | ||
|
||
let f: polyvariant = #Valid | ||
|
||
switch f { | ||
| #Invalid => () | ||
} |
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
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
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
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