-
Notifications
You must be signed in to change notification settings - Fork 708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wast2json
miscompiles "if.wast" from the specification tests
#2417
Comments
Do you know how the test is currently passing give that this looks like it is actually a valid module? |
Oh I see, its still failing, since its not valid to have and empty else block:
Is the expectation that wabt should write out the empty else block as part of the binary? Either way produces an invalid binary, so I'm not sure it really matters does it? |
@keithw WDYT? |
That is what I expected.
That's probably true for this case. I would still expect the WAST to literally translate to the equivalent binary. Perhaps the specification tests should add the following as an additional test case. (assert_invalid
(module (func $type-else-value-empty-vs-num (result i32)
(if (result i32) (i32.const 1) (then (i32.const 0)))
))
"type mismatch"
) |
The following WAST test expression from if.wast miscompiles, omitting the empty else block:
WABT version: 0df6c26
The text was updated successfully, but these errors were encountered: