| 1 |
;; RUN: wast --assert default --snapshot tests/snapshots % -f stack-switching |
| 2 |
|
| 3 |
;; Unrelated source & target continuations types |
| 4 |
(assert_invalid |
| 5 |
(module |
| 6 |
(type $sft (func (param i32) (result i32))) |
| 7 |
(type $sct (cont $sft)) |
| 8 |
(type $tft (func (param f32) (result f32))) |
| 9 |
(type $tct (cont $tft)) |
| 10 |
|
| 11 |
(func $f (param $n i32) (result i32) |
| 12 |
(local.get $n)) |
| 13 |
(elem declare func $f) |
| 14 |
|
| 15 |
(func $unrelated-types (export "unrelated-types") |
| 16 |
(cont.bind $sct $tct (cont.new $sct (ref.func $f))) |
| 17 |
(drop)) |
| 18 |
) |
| 19 |
"type mismatch") |