Skip to content

Calling generic function which can't resolve typename should print better errorΒ #582

Closed
@MaxGraey

Description

@MaxGraey
function test<T>(x: i32): i32 {
  return x << sizeof<T>();
}
test(1); // call function without specify typename

Output:

ERROR: AssertionError: assertion failed
a@https://assemblyscript.github.io/assemblyscript/dist/assemblyscript.js:2:131395
r.assert@https://assemblyscript.github.io/assemblyscript/dist/assemblyscript.js:2:134139
...

Expected:

ASxxxx: Can't resolve typename for `test`

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