forked from lpw25/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more new test cases for module inclusion errors
These test cases will also have improved error messages in the next non-test commit. They come from the work done to address reviewer comments for ocaml#10407.
- Loading branch information
Showing
4 changed files
with
426 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
(* TEST | ||
* expect | ||
*) | ||
|
||
type i = int | ||
|
||
type 'a t = T : i | ||
[%%expect{| | ||
type i = int | ||
Line 3, characters 16-17: | ||
3 | type 'a t = T : i | ||
^ | ||
Error: Constraints are not satisfied in this type. | ||
Type i should be an instance of 'a t | ||
|}] | ||
|
||
type 'a t = T : i t | ||
type 'a s = 'a t = T : i t | ||
[%%expect{| | ||
type 'a t = T : i t | ||
Line 2, characters 23-26: | ||
2 | type 'a s = 'a t = T : i t | ||
^^^ | ||
Error: Constraints are not satisfied in this type. | ||
Type i t should be an instance of 'a s | ||
|}] | ||
|
||
type 'a t = T : i s | ||
and 'a s = 'a t | ||
[%%expect{| | ||
Line 1, characters 16-19: | ||
1 | type 'a t = T : i s | ||
^^^ | ||
Error: Constraints are not satisfied in this type. | ||
Type i s should be an instance of 'a t | ||
|}] |
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
Oops, something went wrong.