Skip to content

Commit ead8bcf

Browse files
committed
Demonstrate a remaining issue
1 parent 7267e58 commit ead8bcf

File tree

1 file changed

+16
-0
lines changed
  • testsuite/tests/typing-jkind-bounds

1 file changed

+16
-0
lines changed

testsuite/tests/typing-jkind-bounds/gadt.ml

+16
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,19 @@ Error: The kind of type "existential_abstract" is value mod portable
266266
immediate
267267
because of the annotation on the declaration of the type existential_abstract.
268268
|}]
269+
270+
(* Some hard recursive types with existentials *)
271+
type existential_abstract : immediate =
272+
| P : ('a : value mod portable). 'a abstract t2 -> existential_abstract
273+
and 'a t2 = P : { contents : 'a; other : 'b option } -> 'a t2
274+
and 'a abstract : value mod portable
275+
[%%expect{|
276+
Lines 1-2, characters 0-73:
277+
1 | type existential_abstract : immediate =
278+
2 | | P : ('a : value mod portable). 'a abstract t2 -> existential_abstract
279+
Error: The kind of type "existential_abstract" is value mod portable with 'a
280+
because it's a boxed variant type.
281+
But the kind of type "existential_abstract" must be a subkind of
282+
immediate
283+
because of the annotation on the declaration of the type existential_abstract.
284+
|}]

0 commit comments

Comments
 (0)