Skip to content

Small code makes parser hang #1999

@Y--

Description

@Y--

Hi!

If you try to paste this small snipped in the AS editor, and try to look at the WASM generated, the page becomes unresponsive:

export function foo() {
  if (idof<Foo>() == idof<Bar>) {
    baz();
  } else {
    `Some string`
  }
}

Note that:

  • the code is not correct (it is missing the parenthesis to call idof in idof<Bar>)
  • if you remove the string template, from the else branch, the issue disappear
  • if you fix the idof call, the issue disappear

Let me know if you need any additional detail on this.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions