Skip to content

Instantly share code, notes, and snippets.

@pepyakin
Created February 7, 2018 09:47
Show Gist options
  • Save pepyakin/d2c8f8606bf251ab4884f20348161eee to your computer and use it in GitHub Desktop.
Save pepyakin/d2c8f8606bf251ab4884f20348161eee to your computer and use it in GitHub Desktop.
(module (func (export "test") (result i32)
(block (result i32)
(unreachable) (br_if 0 (i32.const 0) (i32.const 0)) (i32.const 0)
)
)
)
@pepyakin
Copy link
Author

pepyakin commented Feb 7, 2018

wasm2wat says:

Error: validate failed:
test.wast:3:60: error: type mismatch in block, expected [] but got [i32]
      (unreachable) (br_if 0 (i32.const 0) (i32.const 0)) (i32.const 0)
                                                           ^^^^^^^^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment