Title: Assigning namespaced classes to a variable results in an assertion error · Issue #1790 · AssemblyScript/assemblyscript · GitHub
Open Graph Title: Assigning namespaced classes to a variable results in an assertion error · Issue #1790 · AssemblyScript/assemblyscript
X Title: Assigning namespaced classes to a variable results in an assertion error · Issue #1790 · AssemblyScript/assemblyscript
Description: Taking into account the following code: // bar.ts export namespace bar { export class Bar{} } import { bar } from './bar'; export const aliasBar = bar.Bar; This results in an assertion rather than a diagnostic, I'm aware that the express...
Open Graph Description: Taking into account the following code: // bar.ts export namespace bar { export class Bar{} } import { bar } from './bar'; export const aliasBar = bar.Bar; This results in an assertion rather than ...
X Description: Taking into account the following code: // bar.ts export namespace bar { export class Bar{} } import { bar } from './bar'; export const aliasBar = bar.Bar; This results in an assertion rath...
Opengraph URL: https://github.com/AssemblyScript/assemblyscript/issues/1790
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Assigning namespaced classes to a variable results in an assertion error","articleBody":"Taking into account the following code:\r\n\r\n```ts\r\n// bar.ts\r\n\r\nexport namespace bar {\r\n export class Bar{}\r\n}\r\n```\r\n\r\n```index.ts\r\n\r\nimport { bar } from './bar';\r\n\r\nexport const aliasBar = bar.Bar;\r\n```\r\n\r\nThis results in an assertion rather than a diagnostic, I'm aware that the expression above is not legal, and as such, I think this should emit the same diagnostic as if the imported class didn't belong to a namespace:\r\n\r\n```\r\nERROR AS234: Expression refers to a static element that does not compile to a value at runtime.\r\n```\r\n\r\nCompiler version: `0.18.21`\r\n\r\n","author":{"url":"https://github.com/saulecabrera","@type":"Person","name":"saulecabrera"},"datePublished":"2021-04-07T00:11:49Z","url":"https://github.com/AssemblyScript/assemblyscript/issues/1790"}
| 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:8e06485e-d996-0dca-e33d-3b0fb84c26f2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2BC:20F00E:6068FC:807925:6B00AA2C |
| html-safe-nonce | 6c1ffc0678ea7b07a5fca84dc3ed43d97ac3294ed39f4a1044994665b0c84810 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkJDOjIwRjAwRTo2MDY4RkM6ODA3OTI1OjZCMDBBQTJDIiwidmlzaXRvcl9pZCI6IjMwNTQzMTgyNTA0NjYxMjUyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2699a1c6b3550aa9e0fa71432ab6c9904988d6c7622b3bf01eb5d1b1f13d2812 |
| hovercard-subject-tag | issue:851895492 |
| 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/1790/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c800a71374379731e78f082bb166ebae547918f6b4f9a98bcfc1d6c88435536f/AssemblyScript/assemblyscript/issues/1790 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c800a71374379731e78f082bb166ebae547918f6b4f9a98bcfc1d6c88435536f/AssemblyScript/assemblyscript/issues/1790 |
| og:image:alt | Taking into account the following code: // bar.ts export namespace bar { export class Bar{} } import { bar } from './bar'; export const aliasBar = bar.Bar; This results in an assertion rather than ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | saulecabrera |
| hostname | github.com |
| expected-hostname | github.com |
| None | 455b493e3402a3a3a06beac5d20bb7db3da060808b220aa48d6a7eca7c59863a |
| 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 | 2f575159976167242d488c0b062eb355c4e198b7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width