-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve error message for duplicate labels (#6415)
- Loading branch information
Showing
4 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
jscomp/build_tests/super_errors/expected/duplicate_labels_error.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,11 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/duplicate_labels_error.res[0m:[2m3:3-6[0m | ||
|
||
1 [2m│[0m type rcrd = { | ||
2 [2m│[0m name: string, | ||
[1;31m3[0m [2m│[0m [1;31mname[0m: int, | ||
4 [2m│[0m } | ||
5 [2m│[0m | ||
|
||
The field [1;33mname[0m is defined several times in the record [1;33mrcrd[0m. Fields can only be added once to a record. |
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
4 changes: 4 additions & 0 deletions
4
jscomp/build_tests/super_errors/fixtures/duplicate_labels_error.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,4 @@ | ||
type rcrd = { | ||
name: string, | ||
name: int, | ||
} |
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