-
Notifications
You must be signed in to change notification settings - Fork 470
Clean up Super_error #6199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Clean up Super_error #6199
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8db4e2f
add tests
mununki 4b8c3ee
error message with loc of repeated definition
mununki 4ec6771
changelog
mununki 2bd9366
clean up
mununki 6a76c51
clean up super_error
mununki 9706da8
use Location.print_loc
mununki 10ac8c0
move some tests from ounit to super_errors
mununki 9d4e302
changelog
mununki 8d8bf81
remove unused ounit tests
mununki 4ecaeb3
changelog
mununki 2c24e15
changelog
mununki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
jscomp/build_tests/super_errors/expected/type2.res.expected
This file contains hidden or 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,14 @@ | ||
|
||
[1;31mWe've found a bug for you![0m | ||
[36m/.../fixtures/type2.res[0m:[2m6:11-13[0m | ||
|
||
4 [2m│[0m let () = { | ||
5 [2m│[0m push(a, 3)->ignore | ||
[1;31m6[0m [2m│[0m push(a, [1;31m"3"[0m)->ignore | ||
7 [2m│[0m } | ||
8 [2m│[0m | ||
|
||
This has type: [1;31mstring[0m | ||
Somewhere wanted: [1;33mint[0m | ||
|
||
You can convert [1;33mstring[0m to [1;33mint[0m with [1;33mBelt.Int.fromString[0m. |
13 changes: 13 additions & 0 deletions
13
jscomp/build_tests/super_errors/expected/type3.res.expected
This file contains hidden or 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/type3.res[0m:[2m1:5[0m | ||
|
||
[1;31m1[0m [2m│[0m let [1;31mu[0m = [] | ||
2 [2m│[0m | ||
|
||
This expression's type contains type variables that cannot be generalized: | ||
[1;31marray<'_weak1>[0m | ||
|
||
This happens when the type system senses there's a mutation/side-effect, | ||
in combination with a polymorphic value. | ||
[1;33mUsing or annotating that value usually solves it.[0m |
This file contains hidden or 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 @@ | ||
@send external push: (array<'a>, 'a) => unit = "push" | ||
|
||
let a = [] | ||
let () = { | ||
push(a, 3)->ignore | ||
push(a, "3")->ignore | ||
} |
This file contains hidden or 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 @@ | ||
let u = [] |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you delete instead of commenting out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8d8bf81