Skip to content
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

select validation #423

Closed
dschuff opened this issue Feb 14, 2017 · 2 comments
Closed

select validation #423

dschuff opened this issue Feb 14, 2017 · 2 comments

Comments

@dschuff
Copy link
Member

dschuff commented Feb 14, 2017

The spec interpreter accepts the following

(module (func
  br 0
  block i32
   br 1
  end
  i32.const 0
  select
  drop
))

But rejects the following:

(module (func
 br 0
 block f32
  br 1
 end
 i32.const 0
 select
 drop
))

selecttest2.wast:7.2-7.8: invalid module: type mismatch: operator requires [i32 i32 i32] but stack has [_ f32 i32]
For the second example I believe the _ should match f32 and be valid, correct? (FWIW wabt's validator accepts that).

@lukewagner
Copy link
Member

Agreed (and tested in SM with polymorphic-checking patch).

@rossberg
Copy link
Member

Correct, thanks! See #424 for a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants