Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash during compile #2707

Closed
Pro2stinger opened this issue Jun 13, 2023 · 1 comment · Fixed by #2748
Closed

crash during compile #2707

Pro2stinger opened this issue Jun 13, 2023 · 1 comment · Fixed by #2748
Labels

Comments

@Pro2stinger
Copy link

Bug description

$ asc simple.ts -o simple.wasm

▌ Whoops, the AssemblyScript compiler has crashed during compile :-(

▌ Here is the stack trace hinting at the problem, perhaps it's useful?

▌ AssertionError: assertion failed
▌ at Y.assert (/data/data/com.termux/files/usr/lib/node_modules/assemblyscript/std/portable/index.js:216:11)
▌ at Kn.resolveFunctionType (/data/data/com.termux/files/usr/lib/node_modules/assemblyscript/src/resolver.ts:395:11)
▌ at Kn.resolveType (/data/data/com.termux/files/usr/lib/node_modules/assemblyscript/src/resolver.ts:172:25)
▌ at Kn.resolveFunction (/data/data/com.termux/files/usr/lib/node_modules/assemblyscript/src/resolver.ts:2866:32)
▌ at jr.compileModuleExport (/data/data/com.termux/files/usr/lib/node_modules/assemblyscript/src/compiler.ts:933:48)
▌ at jr.compileModuleExports (/data/data/com.termux/files/usr/lib/node_modules/assemblyscript/src/compiler.ts:914:14)
▌ at jr.compile (/data/data/com.termux/files/usr/lib/node_modules/assemblyscript/src/compiler.ts:549:14)
▌ at Module.z0 (/data/data/com.termux/files/usr/lib/node_modules/assemblyscript/src/index-wasm.ts:358:32)
▌ at Module.Me (/data/data/com.termux/files/usr/lib/node_modules/assemblyscript/cli/index.js:731:31)
▌ at async file:///data/data/com.termux/files/usr/lib/node_modules/assemblyscript/bin/asc.js:33:22

▌ If you see where the error is, feel free to send us a pull request. If not,
▌ please let us know: https://github.com/AssemblyScript/assemblyscript/issues

▌ Thank you!

Steps to reproduce

`export function add(a: i32, b: i32): i32 {
return a + b;
}

export function cache(func: (...args: any[]) => any): (...args: any[]) => any {
return function cached(...args: any[]): any {
return func(...args);
}
}`

AssemblyScript version

0.27.5

@MaxGraey
Copy link
Member

AssemblyScript doesn't support any type. Also, doen't support spread syntax yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants