Debian Codegraph @

tests/cli/component-model-gc/error-context.wast

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