You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Referencing a function prototype with no type parameters leads to assertion failure #1181
If you reference a function prototype that requires a type parameter and omit that type parameter, you get an assertion failure rather than a helpful error:
function doit<T,X,O,N>(x: T): T {
return x
}
export function test(x: i32): void {
let x = doit;
}
Returns
ERROR: AssertionError: assertion failed
at assert (/Users/duncanuszkay/src/github.com/Shopify/as-fork/assemblyscript/std/portable/index.js:184:9)
at Resolver.resolveFunction (/Users/duncanuszkay/src/github.com/Shopify/as-fork/assemblyscript/src/resolver.ts:2691:7)
at Compiler.compileIdentifierExpression (/Users/duncanuszkay/src/github.com/Shopify/as-fork/assemblyscript/src/compiler.ts:7954:46)
at Compiler.compileExpression (/Users/duncanuszkay/src/github.com/Shopify/as-fork/assemblyscript/src/compiler.ts:3327:21)
at Compiler.compileBinaryExpression (/Users/duncanuszkay/src/github.com/Shopify/as-fork/assemblyscript/src/compiler.ts:3735:25)
at Compiler.compileExpression (/Users/duncanuszkay/src/github.com/Shopify/as-fork/assemblyscript/src/compiler.ts:3302:21)
at Compiler.compileVariableStatement (/Users/duncanuszkay/src/github.com/Shopify/as-fork/assemblyscript/src/compiler.ts:2868:25)
at Compiler.compileStatement (/Users/duncanuszkay/src/github.com/Shopify/as-fork/assemblyscript/src/compiler.ts:1984:21)
at Compiler.compileStatements (/Users/duncanuszkay/src/github.com/Shopify/as-fork/assemblyscript/src/compiler.ts:2031:23)
at Compiler.compileFunctionBody (/Users/duncanuszkay/src/github.com/Shopify/as-fork/assemblyscript/src/compiler.ts:1393:20)
Activity