Skip to content

Ensure call-less references to builtin functions in namespaces error #2738

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

Merged

Conversation

CountBleck
Copy link
Member

Changes proposed in this pull request:
⯈ Fix the long-standing bug where the compiler cries when referencing a generic namespaced function.
⯈ Error when builtin functions in namespaces are referenced without being called.

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

The equivalent check exists for identifiers, so I ripped that same code
and inserted it in compilePropertyAccessExpression. While this is
technically a fix for AssemblyScript#2737, we're not quite done yet.
This commit uses the same approach from the previous one: yoinking code
from compileIdentifierExpression. This actually has no influence on the
example in AssemblyScript#2737, but I can say this commit truly fixes AssemblyScript#2737 in spirit.
@HerrCai0907
Copy link
Member

should fix: #2737 #2747

@HerrCai0907 HerrCai0907 merged commit 58ed2b2 into AssemblyScript:main Oct 1, 2023
@CountBleck CountBleck deleted the namespace-builtin-member branch October 9, 2023 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crash when compile PropertyAccessExpression memory.data causing asc crashed during compile
2 participants