| 1 |
;; RUN: wast --assert default --snapshot tests/snapshots % |
| 2 |
|
| 3 |
(module |
| 4 |
(table 1 funcref) |
| 5 |
(elem (offset i32.const 0) funcref) |
| 6 |
(elem (i32.const 0) funcref) |
| 7 |
(elem (offset i32.const 0 i32.const 0 i32.add) funcref) |
| 8 |
(elem (offset (i32.add (i32.const 0) (i32.const 0))) funcref) |
| 9 |
(elem (i32.add (i32.const 0) (i32.const 0)) funcref) |
| 10 |
) |
| 11 |
|
| 12 |
(assert_invalid |
| 13 |
(module |
| 14 |
(table 1 funcref) |
| 15 |
(elem (i32.const 0) funcref (ref.null extern)) |
| 16 |
) |
| 17 |
"type mismatch" |
| 18 |
) |
| 19 |
(assert_malformed |
| 20 |
(module |
| 21 |
(table 1 funcref) |
| 22 |
(elem (i32.const 0) funcref (if)) |
| 23 |
) |
| 24 |
"control frames remain" |
| 25 |
) |
| 26 |
(assert_malformed |
| 27 |
(module quote |
| 28 |
"(table 1 funcref)" |
| 29 |
"(elem (i32.const 0 i32.const 0 i32.add) funcref)" |
| 30 |
) |
| 31 |
"folded instruction" |
| 32 |
) |