summaryrefslogtreecommitdiff
path: root/test/parse
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2022-01-14 16:17:42 -0800
committerGitHub <noreply@github.com>2022-01-15 00:17:42 +0000
commitc5de1f5bbef142f56c8c329c315d5a3776322295 (patch)
tree643ae5ab5a7a116588234a0f239d81a09679b3e3 /test/parse
parente37f666f8aebece51e3efbec9343a04cc3a29bd6 (diff)
downloadwabt-c5de1f5bbef142f56c8c329c315d5a3776322295.tar.gz
wabt-c5de1f5bbef142f56c8c329c315d5a3776322295.tar.bz2
wabt-c5de1f5bbef142f56c8c329c315d5a3776322295.zip
Fix wat parsing of function imports with type name + inline type (#1808)
This simplifies the code for parsing imported functions and makes it match more closely the code for parsing non-imported functions. Fixes: #1806
Diffstat (limited to 'test/parse')
-rw-r--r--test/parse/module/import-func.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/parse/module/import-func.txt b/test/parse/module/import-func.txt
index 79b525f9..d71784ef 100644
--- a/test/parse/module/import-func.txt
+++ b/test/parse/module/import-func.txt
@@ -1,5 +1,7 @@
;;; TOOL: wat2wasm
(module
+ (type $add_type (func (param i32 i32) (result i32)))
+
;; unnamed
(import "foo" "bar" (func (param i32) (result i64)))
@@ -8,4 +10,11 @@
(import "math" "add" (func $add_i32 (param i32 i32) (result i32)))
(import "test" "f32" (func $f32 (param f32) (result f32)))
(import "test" "f64" (func $f64 (param f64) (result f64)))
- (import "test" "i64" (func $i64 (param i64) (result i64))))
+ (import "test" "i64" (func $i64 (param i64) (result i64)))
+
+ ;; named type
+ (import "math" "add" (func $add_i32_2 (type $add_type)))
+
+ ;; named type, with repetition of type inline
+ (import "math" "add" (func $add_i32_3 (type $add_type) (param i32 i32) (result i32)))
+)