Title: Crash (AssertionError) when using an interface inside a namespace · Issue #1599 · AssemblyScript/assemblyscript · GitHub
Open Graph Title: Crash (AssertionError) when using an interface inside a namespace · Issue #1599 · AssemblyScript/assemblyscript
X Title: Crash (AssertionError) when using an interface inside a namespace · Issue #1599 · AssemblyScript/assemblyscript
Description: Hi! First thanks for all the work on AssemblyScript, it's getting really interesting! 👏 Looking forward to closures support, and really impressed to see a working GC :) It seems that the compiler is crashing when an interface is declared...
Open Graph Description: Hi! First thanks for all the work on AssemblyScript, it's getting really interesting! 👏 Looking forward to closures support, and really impressed to see a working GC :) It seems that the compiler i...
X Description: Hi! First thanks for all the work on AssemblyScript, it's getting really interesting! 👏 Looking forward to closures support, and really impressed to see a working GC :) It seems that the compil...
Opengraph URL: https://github.com/AssemblyScript/assemblyscript/issues/1599
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash (AssertionError) when using an interface inside a namespace","articleBody":"Hi!\r\n\r\nFirst thanks for all the work on AssemblyScript, it's getting really interesting! 👏 Looking forward to closures support, and really impressed to see a working GC :) \r\n\r\nIt seems that the compiler is crashing when an interface is declared inside a namespace. Hope it's not already reported somewhere, but I could not find anything similar. \r\n\r\nTrying to compile this file:\r\n```ts\r\nexport namespace test {\r\n interface SomeInterface {\r\n member: boolean;\r\n };\r\n}\r\n```\r\n\r\nWill result in this error:\r\n```\r\nError [AssertionError]: assertion failed\r\n at i.assert (/Users/florian/Projects/F/assembly-script-tests/node_modules/assemblyscript/dist/assemblyscript.js:7:701080)\r\n at T.compileElement (/Users/florian/Projects/F/assembly-script-tests/node_modules/assemblyscript/dist/assemblyscript.js:7:201113)\r\n at T.compileElement (/Users/florian/Projects/F/assembly-script-tests/node_modules/assemblyscript/dist/assemblyscript.js:7:201226)\r\n at T.compileExports (/Users/florian/Projects/F/assembly-script-tests/node_modules/assemblyscript/dist/assemblyscript.js:7:201399)\r\n at T.compile (/Users/florian/Projects/F/assembly-script-tests/node_modules/assemblyscript/dist/assemblyscript.js:7:192905)\r\n at Object.t.compile (/Users/florian/Projects/F/assembly-script-tests/node_modules/assemblyscript/dist/assemblyscript.js:7:438198)\r\n at /Users/florian/Projects/F/assembly-script-tests/node_modules/assemblyscript/cli/asc.js:715:29\r\n at measure (/Users/florian/Projects/F/assembly-script-tests/node_modules/assemblyscript/cli/asc.js:1099:3)\r\n at Object.main (/Users/florian/Projects/F/assembly-script-tests/node_modules/assemblyscript/cli/asc.js:714:24)\r\n at /Users/florian/Projects/F/assembly-script-tests/node_modules/assemblyscript/bin/asc:21:47\r\n/Users/florian/Projects/F/assembly-script-tests/node_modules/binaryen/index.js:54\r\nfunction Ka(){var b=a.preRun.shift();Fa.unshift(b)}var L=0,La=null,Ma=null;a.preloadedImages={};a.preloadedAudios={};function q(b){if(a.onAbort)a.onAbort(b);v(b);wa=!0;throw new va(\"abort(\"+b+\"). Build with -s ASSERTIONS=1 for more info.\");}function Na(b){var d=Oa;return String.prototype.startsWith?b.startsWith(d):0===b.indexOf(d)}var Oa=\"data:application/octet-stream;base64,\",Pa=\"\u003c\u003c\u003c WASM_BINARY_FILE >>>\";if(!Na(Pa)){var Qa=Pa;Pa=a.locateFile?a.locateFile(Qa,p):p+Qa}var Ra,Sa;\r\n ^\r\n\r\nError: abort(AssertionError: assertion failed). Build with -s ASSERTIONS=1 for more info.\r\n at process.q (/Users/florian/Projects/F/assembly-script-tests/node_modules/binaryen/index.js:54:175)\r\n at process.emit (events.js:315:20)\r\n at processPromiseRejections (internal/process/promises.js:245:33)\r\n at processTicksAndRejections (internal/process/task_queues.js:94:32)\r\n```\r\n\r\nI've checked the parser tests and it seems that interface should be supported, but maybe not in namespaces? \r\nIt seems this could generate other issues, because I have a larger file that continue to crash with interfaces even when taken outside of the namespace, but I figured I would first report this minimal case :) ","author":{"url":"https://github.com/4ian","@type":"Person","name":"4ian"},"datePublished":"2020-12-23T19:25:40Z","url":"https://github.com/AssemblyScript/assemblyscript/issues/1599"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:52c2138c-b442-f4e9-4697-bbce949ea625 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 85D0:1DB827:75F48C:A31B37:6B009E73 |
| html-safe-nonce | 491e57c014411d518b13a7c286a160bceb5971b6c79a413245d74c07027e5385 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUQwOjFEQjgyNzo3NUY0OEM6QTMxQjM3OjZCMDA5RTczIiwidmlzaXRvcl9pZCI6IjcyNDYyMTA4MTIwMzYwMzAwNjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8d6fc35470ee380b4e8e8545ad6a1768260ec922f43974398dad57e44c883ea8 |
| hovercard-subject-tag | issue:774000088 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/AssemblyScript/assemblyscript/1599/issue_layout |
| twitter:image | https://opengraph.githubassets.com/937085d69fc92c0fb8640004e709deff699bcd193fde17ccf77bead215f4dca8/AssemblyScript/assemblyscript/issues/1599 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/937085d69fc92c0fb8640004e709deff699bcd193fde17ccf77bead215f4dca8/AssemblyScript/assemblyscript/issues/1599 |
| og:image:alt | Hi! First thanks for all the work on AssemblyScript, it's getting really interesting! 👏 Looking forward to closures support, and really impressed to see a working GC :) It seems that the compiler i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 4ian |
| hostname | github.com |
| expected-hostname | github.com |
| None | 52c95ce7e48016ae14399656b4ee812462b6f1fa28c5008c8394da64794c00b8 |
| turbo-cache-control | no-preview |
| go-import | github.com/AssemblyScript/assemblyscript git https://github.com/AssemblyScript/assemblyscript.git |
| octolytics-dimension-user_id | 28916798 |
| octolytics-dimension-user_login | AssemblyScript |
| octolytics-dimension-repository_id | 105138356 |
| octolytics-dimension-repository_nwo | AssemblyScript/assemblyscript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 105138356 |
| octolytics-dimension-repository_network_root_nwo | AssemblyScript/assemblyscript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1c9ddec8215f9a94e295c8310c3579b9c54ba31a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width