Compiler hangs with invalid object return type and string interpolation
When a function has a custom object type definition and it contains a string interpolation value the compiler hangs with no output.
To replicate:
export function example(): { id: string } {
return { id: `` };
}
It doesn't matter what is inside of the string, as long as it contains the string definition with the back-ticks it'll hang.
The string definition doesn't need to be inside a variable definition or in the return statement, the following will still cause the issue:
export function example(): { id: string } {
``;
return { id: "" };
}
When removing the back-ticks the compiler stops and outputs the error as expected:
ERROR TS1110: Type expected.
export function example(): { id: string } {
in tests/helpers/example...
This doesn't appear to be an issue in newer versions of the AssemblyScript compiler, upgrading it will likely solve the issue
I think this is fixed now in the latest versions of AssemblyScript and the @graphprotocol packages, so this issue can be closed?