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

[JavaScript] Support private property accessors. #1950

Merged
merged 1 commit into from
Jul 29, 2019

Conversation

Thom1729
Copy link
Collaborator

Fix #1949.

The original implementation in #1292 did not properly support private property accessors, but in most cases they worked almost-correctly by coincidence. #1949 identifies a case in which they do not work at all. This PR implements them correctly.

Private fields are part of the TC39 class fields proposal, which is Stage 3.

@wbond
Copy link
Member

wbond commented Jul 29, 2019

Thanks!

@wbond wbond merged commit 1e5be41 into sublimehq:master Jul 29, 2019
@Thom1729 Thom1729 deleted the javascript-private-field-property branch July 29, 2019 20:22
@rwols
Copy link
Contributor

rwols commented Sep 10, 2020

What about private methods?

class SomeClass {
    #somePrivateMethod(data) {
        return "foo";
    }
}

image

I'm seeing this at the company I work at right now.

@Thom1729
Copy link
Collaborator Author

Fixed in #2476. Thanks for reporting.

mitranim pushed a commit to mitranim/Packages that referenced this pull request Mar 25, 2022
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.

Class fields
3 participants