Skip to content
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

Fix constructor parameter initialization order #1934

Merged
merged 1 commit into from
Jun 29, 2021
Merged

Fix constructor parameter initialization order #1934

merged 1 commit into from
Jun 29, 2021

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Jun 28, 2021

Updates initialization order of constructor parameters (with access modifier to also become fields) to first initialize the parameters (and emit an error if this or super are accessed) before executing other field initializers, as of JS/TS semantics.

fixes #1918

  • I've read the contributing guidelines

@dcodeIO dcodeIO merged commit f4091b8 into main Jun 29, 2021
@dcodeIO dcodeIO deleted the issue-1918 branch June 29, 2021 21:15
romdotdog pushed a commit to romdotdog/assemblyscript that referenced this pull request Jul 19, 2021
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.

bug: constructor parameter members initialized in wrong order
1 participant