Skip to content

[spec+interpreter] Accepts "i32.const0" (missing space) #478

@sunfishcode

Description

@sunfishcode

The interpreter currently accepts the following:

(module (func (export "foo") (result i32) (i32.const0)))

(assert_return (invoke "foo") (i32.const0))

Note that there's no space between the i32.const and the 0. This doesn't create any actual ambiguity, but it doesn't seem to add meaningful flexibility either, and it's surprising.

For reference, wabt and binaryen both issue errors on this code.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions