You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working on the type system and in particular how the empty-type (result of br and unreachable) are handled suggested this challenge which fails the current ml-proto and sexp-wasm checks.
This could be handled top-down by not checking the dead code. It can be handled bottom up by the unreachable fall-through result having the empty-type and the union with the break types still being consistent with the expected type.
The text was updated successfully, but these errors were encountered:
Think I understand how this can work now, sorry for the noise. In case it's of interest to other people, the answer seems to be to consider all code live for the purpose of the type verification, then the test is more specific than otherwise but still seems sound. Can't think of any substantive example that breaks by failing to correctly derive that an expression has the empty-type, except for the leaf expressions and parametric operators.
Here's a simpler example. The empty-type would be considered when checking the argument to 'i64.extend_u/i32' but not propagated (bottom-up), so not taken into account when checking the function result.
Working on the type system and in particular how the empty-type (result of
br
andunreachable
) are handled suggested this challenge which fails the current ml-proto and sexp-wasm checks.This could be handled top-down by not checking the dead code. It can be handled bottom up by the unreachable fall-through result having the empty-type and the union with the break types still being consistent with the expected type.
The text was updated successfully, but these errors were encountered: