File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,9 @@ let check_func_type (c : context) (ft : func_type) at =
183
183
184
184
let check_cont_type (c : context ) (ct : cont_type ) at =
185
185
match ct with
186
- | ContT ft -> check_heap_type c ft at
186
+ | ContT (VarHT (StatX x )) ->
187
+ let _dt = func_type c (x @@ at) in ()
188
+ | _ -> error at " ill-formed continuation type"
187
189
188
190
let check_table_type (c : context ) (tt : table_type ) at =
189
191
let TableT (lim, t) = tt in
Original file line number Diff line number Diff line change 205
205
(drop )))
206
206
" non-continuation type 0" )
207
207
208
+ (assert_invalid
209
+ (module
210
+ (type $ct (cont $ct )))
211
+ " non-function type 0" )
212
+
213
+ (assert_invalid
214
+ (module
215
+ (rec
216
+ (type $s0 (struct (field (ref 0 ) (ref 1 ) (ref $s0 ) (ref $s1 ))))
217
+ (type $s1 (struct (field (ref 0 ) (ref 1 ) (ref $s0 ) (ref $s1 ))))
218
+ )
219
+ (type $ct (cont $s0 )))
220
+ " non-function type 0" )
221
+
222
+ (module
223
+ (rec
224
+ (type $f1 (func (param (ref $f2 ))))
225
+ (type $f2 (func (param (ref $f1 ))))
226
+ )
227
+ (type $c1 (cont $f1 ))
228
+ (type $c2 (cont $f2 ))
229
+ )
230
+
208
231
;; Simple state example
209
232
210
233
(module $state
You can’t perform that action at this time.
0 commit comments