File tree 1 file changed +16
-0
lines changed
testsuite/tests/typing-jkind-bounds
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -266,3 +266,19 @@ Error: The kind of type "existential_abstract" is value mod portable
266
266
immediate
267
267
because of the annotation on the declaration of the type existential_abstract.
268
268
|}]
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
+ |}]
You can’t perform that action at this time.
0 commit comments