summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorFlorian Angeletti <florian.angeletti@inria.fr>2023-03-13 14:32:16 +0100
committerFlorian Angeletti <florian.angeletti@inria.fr>2023-03-14 11:20:55 +0100
commit048765bc580bd7473c9f87605259bf5871bdb9c0 (patch)
treeb1e43f4f8f0ea3b6bc6631dd5c796a987df6bada /testsuite
parentce7a325bb4c1bcc7d0200ef3dc8f2141d7f4bf6f (diff)
downloadocaml-048765bc580bd7473c9f87605259bf5871bdb9c0.tar.gz
error messages: aliases for weakly polymorphic row variables
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typing-modules-bugs/pr6899_second_bad.compilers.reference2
-rw-r--r--testsuite/tests/typing-objects/Exemples.ml2
-rw-r--r--testsuite/tests/typing-objects/Tests.ml2
-rw-r--r--testsuite/tests/typing-objects/dummy.ml2
-rw-r--r--testsuite/tests/typing-objects/errors.ml2
-rw-r--r--testsuite/tests/typing-polyvariants-bugs/pr10664a.ml2
-rw-r--r--testsuite/tests/typing-polyvariants-bugs/pr7817_bad.ml13
7 files changed, 14 insertions, 11 deletions
diff --git a/testsuite/tests/typing-modules-bugs/pr6899_second_bad.compilers.reference b/testsuite/tests/typing-modules-bugs/pr6899_second_bad.compilers.reference
index 66950a172c..7646edba86 100644
--- a/testsuite/tests/typing-modules-bugs/pr6899_second_bad.compilers.reference
+++ b/testsuite/tests/typing-modules-bugs/pr6899_second_bad.compilers.reference
@@ -1,5 +1,5 @@
File "pr6899_second_bad.ml", line 12, characters 6-9:
12 | let bar = wrap ()
^^^
-Error: The type of this expression, _[< `Test ] -> unit,
+Error: The type of this expression, ([< `Test ] as '_weak1) -> unit,
contains type variables that cannot be generalized
diff --git a/testsuite/tests/typing-objects/Exemples.ml b/testsuite/tests/typing-objects/Exemples.ml
index 067b8f8f0b..3ab4072c14 100644
--- a/testsuite/tests/typing-objects/Exemples.ml
+++ b/testsuite/tests/typing-objects/Exemples.ml
@@ -517,7 +517,7 @@ class ['a] sorted_list :
let l = new sorted_list ();;
[%%expect{|
-val l : _#comparable sorted_list = <obj>
+val l : (#comparable as '_weak1) sorted_list = <obj>
|}];;
let c = new int_comparable 10;;
[%%expect{|
diff --git a/testsuite/tests/typing-objects/Tests.ml b/testsuite/tests/typing-objects/Tests.ml
index cc7ae24aad..5ca2804f44 100644
--- a/testsuite/tests/typing-objects/Tests.ml
+++ b/testsuite/tests/typing-objects/Tests.ml
@@ -950,7 +950,7 @@ end;;
Line 2, characters 13-58:
2 | method o = object(_ : 'self) method o = assert false end
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Error: Cannot close type of object literal: < o : '_weak3; _.. >
+Error: Cannot close type of object literal: < o : '_weak4; .. > as '_weak3
it has been unified with the self type of a class that is not yet
completely defined.
|}];;
diff --git a/testsuite/tests/typing-objects/dummy.ml b/testsuite/tests/typing-objects/dummy.ml
index f2b797d25b..de8b18822a 100644
--- a/testsuite/tests/typing-objects/dummy.ml
+++ b/testsuite/tests/typing-objects/dummy.ml
@@ -169,7 +169,7 @@ Lines 4-10, characters 4-7:
9 | method child = assert false
10 | end
Error: Cannot close type of object literal:
- < child : '_weak1; previous : 'a option; _.. > as 'a
+ < child : '_weak2; previous : '_weak1 option; .. > as '_weak1
it has been unified with the self type of a class that is not yet
completely defined.
|}]
diff --git a/testsuite/tests/typing-objects/errors.ml b/testsuite/tests/typing-objects/errors.ml
index 7b13b58882..236f7e1d5b 100644
--- a/testsuite/tests/typing-objects/errors.ml
+++ b/testsuite/tests/typing-objects/errors.ml
@@ -9,7 +9,7 @@ Line 1, characters 0-75:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: The type of this class,
class virtual ['a] c :
- object constraint 'a = _[< `A of int & float ] end,
+ object constraint '_a = [< `A of int & float ] as '_weak1 end,
contains non-collapsible conjunctive types in constraints.
Type int is not compatible with type float
|}]
diff --git a/testsuite/tests/typing-polyvariants-bugs/pr10664a.ml b/testsuite/tests/typing-polyvariants-bugs/pr10664a.ml
index 27ab01f00c..7993e10a40 100644
--- a/testsuite/tests/typing-polyvariants-bugs/pr10664a.ml
+++ b/testsuite/tests/typing-polyvariants-bugs/pr10664a.ml
@@ -110,7 +110,7 @@ let y = g o;;
[%%expect{|
val o : < m : 'a 'c. < n : ([< `A of 'a ] as 'c) -> 'b > > as 'b = <obj>
val y :
- < n : _[< `A of '_weak2 ] ->
+ < n : ([< `A of '_weak3 ] as '_weak2) ->
(< m : 'a 'c. < n : ([< `A of 'a ] as 'c) -> 'b > > as 'b) > =
<obj>
|}]
diff --git a/testsuite/tests/typing-polyvariants-bugs/pr7817_bad.ml b/testsuite/tests/typing-polyvariants-bugs/pr7817_bad.ml
index fc9cf7fbda..999420fd2b 100644
--- a/testsuite/tests/typing-polyvariants-bugs/pr7817_bad.ml
+++ b/testsuite/tests/typing-polyvariants-bugs/pr7817_bad.ml
@@ -19,15 +19,18 @@ Lines 5-8, characters 6-3:
8 | end
Error: Signature mismatch:
Modules do not match:
- sig val write : _[< `A of '_weak2 | `B of '_weak3 ] -> unit end
+ sig
+ val write :
+ ([< `A of '_weak3 | `B of '_weak4 ] as '_weak2) -> unit
+ end
is not included in
sig val write : [< `A of string | `B of int ] -> unit end
Values do not match:
- val write : _[< `A of '_weak2 | `B of '_weak3 ] -> unit
+ val write : ([< `A of '_weak3 | `B of '_weak4 ] as '_weak2) -> unit
is not included in
val write : [< `A of string | `B of int ] -> unit
- The type _[< `A of '_weak2 | `B of '_weak3 ] -> unit
+ The type ([< `A of '_weak3 | `B of '_weak4 ] as '_weak2) -> unit
is not compatible with the type [< `A of string | `B of int ] -> unit
- Type _[< `A of '_weak2 | `B of '_weak3 ] is not compatible with type
- [< `A of string | `B of int ]
+ Type [< `A of '_weak3 | `B of '_weak4 ] as '_weak2
+ is not compatible with type [< `A of string | `B of int ]
|}]