-
-
Notifications
You must be signed in to change notification settings - Fork 671
Closed
Labels
Description
Code
namespace Foo {
export default foo;
}
Stack trace
β Whoops, the AssemblyScript compiler has crashed during initialize :-(
β
β Here is the stack trace hinting at the problem, perhaps it's useful?
β
β AssertionError: assertion failed
β at assert (D:\assemblyscript\std\portable\index.js:200:11)
β at Program.initializeNamespace (D:\assemblyscript\src\program.ts:2545:18)
β at Program.initialize (D:\assemblyscript\src\program.ts:1114:18)
β at Object.initializeProgram (D:\assemblyscript\src\index.ts:274:11)
β at D:\assemblyscript\cli\asc.js:886:22
β at measure (D:\assemblyscript\cli\asc.js:1409:3)
β at Object.main (D:\assemblyscript\cli\asc.js:884:27)
β at runTest (D:\assemblyscript\tests\compiler.js:178:7)
β at Array.forEach (<anonymous>)
β at D:\assemblyscript\tests\compiler.js:557:16
β at processTicksAndRejections (node:internal/process/task_queues:96:5)
β
β 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!
What now?
There's a confusing error (in my opinion) that TypeScript generates in this case
A default export can only be used in an ECMAScript-style module.
I think a custom error for this case would be more informative than the above.