Skip to content

wat2wasm: function variable resolution broken #1689

Closed
@Horcrux7

Description

@Horcrux7

The first sample works with 1.0.23 but produce with the version main from today an error.

error: test.wat:2:10: error: undefined function variable "$.<start>"
command line: wat2wasm.exe test.wat --enable-all
OS: Windows 10

(module
  (start $.<start>)
  (event (param externref))
  (func $.<start>
  )
)

This sample works with version 1.0.23 and the current version form main.

(module
  (start $.<start>)
  (func $.<start>
  )
)

The same problem occurs with export of a function. A possible workaround may be to change the order. First the declaration of the function and then the usage. But why change the behavior when an event has been declared?

Metadata

Metadata

Assignees

No one assigned

    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