-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ensure that variant spreads are compliant with the underlying variant…
…s runtime configuration, and get some basic error reporting going
- Loading branch information
Showing
9 changed files
with
129 additions
and
4 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
jscomp/build_tests/super_errors/expected/variant_spread_tag_missing.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,9 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/variant_spread_tag_missing.res[0m:[2m2:15[0m | ||
|
||
1 [2m│[0m @tag("kind") type a = One(int) | Two(string) | ||
[1;31m2[0m [2m│[0m type b = | ...[1;31ma[0m | Three(bool) | ||
3 [2m│[0m | ||
|
||
The @tag attribute does not match for this variant and the variant where this is spread. Both variants must have the same @tag attribute configuration, or no @tag attribute at all. |
9 changes: 9 additions & 0 deletions
9
jscomp/build_tests/super_errors/expected/variant_spread_tag_value_mismatch.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,9 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/variant_spread_tag_value_mismatch.res[0m:[2m2:28[0m | ||
|
||
1 [2m│[0m @tag("kind") type a = One(int) | Two(string) | ||
[1;31m2[0m [2m│[0m @tag("name") type b = | ...[1;31ma[0m | Three(bool) | ||
3 [2m│[0m | ||
|
||
The @tag attribute does not match for this variant and the variant where this is spread. Both variants must have the same @tag attribute configuration, or no @tag attribute at all. |
9 changes: 9 additions & 0 deletions
9
jscomp/build_tests/super_errors/expected/variant_spread_unboxed_mismatch.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,9 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/variant_spread_unboxed_mismatch.res[0m:[2m2:15[0m | ||
|
||
1 [2m│[0m @unboxed type a = One(int) | Two(string) | ||
[1;31m2[0m [2m│[0m type b = | ...[1;31ma[0m | Three(bool) | ||
3 [2m│[0m | ||
|
||
This variant is unboxed, but the variant where this is spread is not. Both variants unboxed configuration must match. |
2 changes: 2 additions & 0 deletions
2
jscomp/build_tests/super_errors/fixtures/variant_spread_tag_missing.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,2 @@ | ||
@tag("kind") type a = One(int) | Two(string) | ||
type b = | ...a | Three(bool) |
2 changes: 2 additions & 0 deletions
2
jscomp/build_tests/super_errors/fixtures/variant_spread_tag_value_mismatch.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,2 @@ | ||
@tag("kind") type a = One(int) | Two(string) | ||
@tag("name") type b = | ...a | Three(bool) |
2 changes: 2 additions & 0 deletions
2
jscomp/build_tests/super_errors/fixtures/variant_spread_unboxed_mismatch.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,2 @@ | ||
@unboxed type a = One(int) | Two(string) | ||
type b = | ...a | Three(bool) |
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