Skip to content

Commit 3c7c0cb

Browse files
authored
Add a test for resuming a null continuation (#124)
1 parent 9971608 commit 3c7c0cb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/core/stack-switching/cont.wast

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@
116116
(func (export "non-linear-4")
117117
(call $nl4 (cont.new $k1 (ref.func $r1)))
118118
)
119+
120+
(func (export "null")
121+
(resume $k1
122+
(ref.null $k1)
123+
)
124+
)
119125
)
120126

121127
(assert_suspension (invoke "unhandled-1") "unhandled")
@@ -132,6 +138,8 @@
132138
(assert_trap (invoke "non-linear-3") "continuation already consumed")
133139
(assert_trap (invoke "non-linear-4") "continuation already consumed")
134140

141+
(assert_trap (invoke "null") "null continuation reference")
142+
135143
(assert_invalid
136144
(module
137145
(type $ft (func))

0 commit comments

Comments
 (0)