Skip to content

Conversation

kvinwang
Copy link
Contributor

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

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

@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.

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.

3 participants