summaryrefslogtreecommitdiff
path: root/test/parse/expr/bad-try-unwind.txt
blob: 7790c6eb717a0b2db9ba741749162d208b14b585 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
;;; ERROR: 1
(module
  (func try nop unwind)

  (func
    try
      nop
    unwind
      nop
    catch 0
      nop
    end)

  ;; folded
  (func
    (try
      (do
        (nop))
      (unwind
        (nop))
      (catch 0
        (nop)))
(;; STDERR ;;;
out/test/parse/expr/bad-try-unwind.txt:5:23: error: unexpected token ), expected end.
  (func try nop unwind)
                      ^
out/test/parse/expr/bad-try-unwind.txt:12:5: error: unexpected token catch, expected end.
    catch 0
    ^^^^^
out/test/parse/expr/bad-try-unwind.txt:14:5: error: unexpected token end, expected ).
    end)
    ^^^
out/test/parse/expr/bad-try-unwind.txt:23:8: error: unexpected token "catch", expected a valid try clause.
      (catch 0
       ^^^^^
;;; STDERR ;;)