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

Meet error about ... operator #1853

Closed
yjhmelody opened this issue May 18, 2021 · 1 comment · Fixed by #1926
Closed

Meet error about ... operator #1853

yjhmelody opened this issue May 18, 2021 · 1 comment · Fixed by #1926
Labels

Comments

@yjhmelody
Copy link
Contributor

mini example:

class Foo {
    data(): Array<u8> {
        return [];
    }
}
export class Bar extends Foo {
    data(): Array<u8> {
        return [...super.data()];
    }
}

The error:

▌ Whoops, the AssemblyScript compiler has crashed during compile :-(
▌ 
▌ Here is a stack trace that may or may not be useful:
▌ 
▌ AssertionError: assertion failed
▌     at i.assert (C:\Users\lenovo\AppData\Roaming\npm\node_modules\assemblyscript\dist\assemblyscript.js:7:737243)
▌     at f.compileUnaryPrefixExpression (C:\Users\lenovo\AppData\Roaming\npm\node_modules\assemblyscript\dist\assemblyscript.js:7:331940)
▌     at f.compileExpression (C:\Users\lenovo\AppData\Roaming\npm\node_modules\assemblyscript\dist\assemblyscript.js:7:238684)
▌     at f.compileArrayLiteral (C:\Users\lenovo\AppData\Roaming\npm\node_modules\assemblyscript\dist\assemblyscript.js:7:310195)
▌     at f.compileLiteralExpression (C:\Users\lenovo\AppData\Roaming\npm\node_modules\assemblyscript\dist\assemblyscript.js:7:306265)
▌     at f.compileExpression (C:\Users\lenovo\AppData\Roaming\npm\node_modules\assemblyscript\dist\assemblyscript.js:7:238319)
▌     at f.compileReturnStatement (C:\Users\lenovo\AppData\Roaming\npm\node_modules\assemblyscript\dist\assemblyscript.js:7:230012)
▌     at f.compileStatement (C:\Users\lenovo\AppData\Roaming\npm\node_modules\assemblyscript\dist\assemblyscript.js:7:223143)
▌     at f.compileStatements (C:\Users\lenovo\AppData\Roaming\npm\node_modules\assemblyscript\dist\assemblyscript.js:7:223935)
▌     at f.compileFunctionBody (C:\Users\lenovo\AppData\Roaming\npm\node_modules\assemblyscript\dist\assemblyscript.js:7:213143)
▌ 
▌ If it refers to the dist files, try to 'npm install source-map-support' and
▌ run again, which should then show the actual code location in the sources.
▌ 
▌ 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!
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!

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.

1 participant