-
-
Notifications
You must be signed in to change notification settings - Fork 655
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
asc crash when use same name in class and namespace #2793
Labels
Comments
That looks like a bug from how internal names are generated. |
CountBleck
added a commit
to CountBleck/assemblyscript
that referenced
this issue
Nov 20, 2023
This commit changes the delimiter between namespaces and their members from "." to "::" in internal names. The new delimiter certainly feels very un-JavaScript-y, but the meaning is still recognizable, and these names aren't exposed to users in most cases anyway. Still, this is a breaking change, as it affects the import names for `declare namespace` members (as seen in tests/compiler/declare.js), and transform authors will also need to update their code accordingly. Fixes AssemblyScript#2793.
This was referenced Nov 20, 2023
CountBleck
added a commit
to CountBleck/assemblyscript
that referenced
this issue
Nov 21, 2023
This isn't fully TS compatible, but refactors targeting internal names, scoping, merging, etc. are needed to become more compatible. For instance, if namespace members had unique separators in internal names, then a non-exported namespace member would override a static class member, assuming the names are the same. Note that this change doesn't prevent the compiler from attempting to compile the duplicate global, and hence the previous commit is needed for this to work fully. Barely fixes AssemblyScript#2793.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description
Steps to reproduce
npm run asbuild
AssemblyScript version
latest
The text was updated successfully, but these errors were encountered: