summaryrefslogtreecommitdiff
path: root/test/spec/exception-handling.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/spec/exception-handling.wast')
-rw-r--r--test/spec/exception-handling.wast38
1 files changed, 37 insertions, 1 deletions
diff --git a/test/spec/exception-handling.wast b/test/spec/exception-handling.wast
index ebca3a009..807ee0a52 100644
--- a/test/spec/exception-handling.wast
+++ b/test/spec/exception-handling.wast
@@ -241,7 +241,7 @@
)
)
)
- "try's type does not match try body's type"
+ "try's type does not match try body's type"
)
(assert_invalid
@@ -263,3 +263,39 @@
)
"event's param numbers must match"
)
+
+(assert_invalid
+ (module
+ (func $f0
+ (block $l0
+ (try
+ (do
+ (try
+ (do)
+ (delegate $l0) ;; target is a block
+ )
+ )
+ (catch_all)
+ )
+ )
+ )
+ )
+ "all delegate targets must be valid"
+)
+
+(assert_invalid
+ (module
+ (func $f0
+ (try $l0
+ (do)
+ (catch_all
+ (try
+ (do)
+ (delegate $l0) ;; the target catch is above the delegate
+ )
+ )
+ )
+ )
+ )
+ "all delegate targets must be valid"
+)