| 1 |
;; RUN: wast % --assert default --snapshot tests/snapshots \ |
| 2 |
;; -f=cm-async,-cm-async-builtins |
| 3 |
|
| 4 |
;; {future,stream}.cancel-{read,write} |
| 5 |
(assert_invalid |
| 6 |
(component |
| 7 |
(type $t (future)) |
| 8 |
(core func (canon future.cancel-read $t async))) |
| 9 |
"requires the component model async builtins feature") |
| 10 |
(assert_invalid |
| 11 |
(component |
| 12 |
(type $t (future)) |
| 13 |
(core func (canon future.cancel-write $t async))) |
| 14 |
"requires the component model async builtins feature") |
| 15 |
(assert_invalid |
| 16 |
(component |
| 17 |
(type $t (stream)) |
| 18 |
(core func (canon stream.cancel-read $t async))) |
| 19 |
"requires the component model async builtins feature") |
| 20 |
(assert_invalid |
| 21 |
(component |
| 22 |
(type $t (stream)) |
| 23 |
(core func (canon stream.cancel-write $t async))) |
| 24 |
"requires the component model async builtins feature") |
| 25 |
|
| 26 |
(component |
| 27 |
(type $f (future)) |
| 28 |
(type $s (stream)) |
| 29 |
(core func (canon future.cancel-read $f)) |
| 30 |
(core func (canon future.cancel-write $f)) |
| 31 |
(core func (canon stream.cancel-read $s)) |
| 32 |
(core func (canon stream.cancel-write $s)) |
| 33 |
) |
| 34 |
|
| 35 |
;; async resource.drop |
| 36 |
(assert_invalid |
| 37 |
(component |
| 38 |
(type $t (resource (rep i32))) |
| 39 |
(core func (canon resource.drop $t async))) |
| 40 |
"requires the component model async builtins feature") |
| 41 |
(component |
| 42 |
(type $t (resource (rep i32))) |
| 43 |
(core func (canon resource.drop $t))) |
| 44 |
|