We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6443179 commit d7cbebaCopy full SHA for d7cbeba
src/boot/me/semant.ml
@@ -2425,7 +2425,7 @@ and referent_type
2425
Some parent_tags
2426
when boxed
2427
&& parent_tags <> []
2428
- && List.mem ttag parent_tags
+ && (list_count ttag parent_tags) > 1
2429
&& is_back_edge ttag (List.hd parent_tags) ->
2430
Il.StructTy [| word; Il.OpaqueTy |]
2431
| _ -> tag ttag
src/boot/util/common.ml
@@ -380,6 +380,13 @@ let rec list_drop n ls =
380
else list_drop (n-1) (List.tl ls)
381
;;
382
383
+let rec list_count elem lst =
384
+ match lst with
385
+ [] -> 0
386
+ | h::t when h = elem -> 1 + (list_count elem t)
387
+ | _::t -> list_count elem t
388
+;;
389
+
390
391
(*
392
* Auxiliary pair functions.
0 commit comments