summaryrefslogtreecommitdiff
path: root/test/typecheck/bad-if-type-mismatch.txt
blob: 90b0a0145d751d0a2ad154edda64c30c6e26c978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;;; TOOL: wat2wasm
;;; ERROR: 1
(module
  (func
    i32.const 0
    if (result i32)
      f32.const 0
    else
      i32.const 0
    end
    drop))
(;; STDERR ;;;
out/test/typecheck/bad-if-type-mismatch.txt:7:7: error: type mismatch in `if true` branch, expected [i32] but got [f32]
      f32.const 0
      ^^^^^^^^^
;;; STDERR ;;)