Skip to content

Commit b34c4be

Browse files
committed
Fixed PR review comments
1 parent 70d2af7 commit b34c4be

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

interpreter/valid/valid.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ let check_limits {min; max} range at msg =
127127

128128
let check_def_type (c : context) (t : def_type) at =
129129
match t with
130-
| DefT (RecT sts, i) -> assert Int32.(compare i (of_int (List.length sts)) < 0)
130+
| DefT (RecT sts, i) -> assert (i < Lib.List32.length sts)
131131

132132
let check_num_type (c : context) (t : num_type) at =
133133
()

test/core/tag.wast

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121
;; "non-empty tag result type"
2222
;; )
2323

24+
;; Mutually recursive types
25+
(module
26+
(rec
27+
(type $f (func (param (ref null $c))))
28+
(type $c (cont $f))
29+
)
30+
(tag (type $f))
31+
)
2432

2533
;; Link-time typing
2634

0 commit comments

Comments
 (0)