Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix declaring property named get/set/async #476

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

kvinwang
Copy link
Contributor

    class P {
        get;
        get = () => "123";
    }

Got SyntaxError: invalid property name.
This PR fixes it.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@saghul
Copy link
Contributor

saghul commented Jul 25, 2024

Is this a port from bellard/quickjs ?

@kvinwang
Copy link
Contributor Author

Is this a port from bellard/quickjs ?

No, should I move this PR the the upstream? I submit it here because I use this fork in my project.
Looks like both repo are actively maintained. A bit confusing.

@saghul
Copy link
Contributor

saghul commented Jul 25, 2024

No need, I think this was fixed there too, that's why I asked.

@richarddd
Copy link
Contributor

This fixes another pattern where we declare a property (without initalizing it) called get, and later initilizes is. My original QuickJS PR didn't consider this. Should be added to upstream as well.

@saghul saghul merged commit c4d3833 into quickjs-ng:master Jul 25, 2024
50 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants