| 1 |
;; RUN: wast --assert default --snapshot tests/snapshots % -f gc,cm-gc,cm-async |
| 2 |
|
| 3 |
(component |
| 4 |
(type $future (future bool)) |
| 5 |
|
| 6 |
(core type $ty (func (param externref))) |
| 7 |
|
| 8 |
(import "i" (instance $i |
| 9 |
(export "f" (func (param "x" $future))))) |
| 10 |
(core func (canon lower (func $i "f") gc string-encoding=utf8 (core-type $ty))) |
| 11 |
) |
| 12 |
|
| 13 |
(assert_invalid |
| 14 |
(component |
| 15 |
(type $future (future bool)) |
| 16 |
|
| 17 |
(core type $ty (func (param anyref))) |
| 18 |
|
| 19 |
(import "i" (instance $i |
| 20 |
(export "f" (func (param "x" $future))))) |
| 21 |
(core func (canon lower (func $i "f") gc string-encoding=utf8 (core-type $ty))) |
| 22 |
) |
| 23 |
"expected to lower component `future` type into core `(ref null? extern)` type, but found `anyref`" |
| 24 |
) |