summaryrefslogtreecommitdiff
path: root/test/parse/expr/callref-internal-function.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/parse/expr/callref-internal-function.txt')
-rw-r--r--test/parse/expr/callref-internal-function.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/parse/expr/callref-internal-function.txt b/test/parse/expr/callref-internal-function.txt
new file mode 100644
index 00000000..5cc27cc6
--- /dev/null
+++ b/test/parse/expr/callref-internal-function.txt
@@ -0,0 +1,14 @@
+;;; TOOL: wat2wasm
+;;; ARGS: --enable-function-references
+(module
+ (func (export "main") (result i32)
+ (call_ref (i32.const 10)
+ (ref.func $foo)
+ )
+ )
+ (func $foo (param $x i32) (result i32)
+ (i32.add (local.get $x)
+ (i32.const 19))
+ )
+ (elem declare funcref (ref.func $foo))
+)