-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Unable to call private class property #4872
Comments
facebook-github-bot
pushed a commit
that referenced
this issue
Aug 17, 2021
Summary: This diff adds support for type checking private methods. I added private methods and private static methods into the same class entries that stores type signature of private fields, and then use these type signature information to resolve `GetPrivatePropT` and `PrivateMethodT`. I also ensured that unbinding private methods are also correctly errored on, similar to unbound public methods. Fixes #6254 #4872 #7877. Reviewed By: jbrown215 Differential Revision: D30023778 fbshipit-source-id: 5575306de4ac504a92fb8bba221221566b5ac52d
facebook-github-bot
pushed a commit
that referenced
this issue
Aug 18, 2021
Summary: This diff adds support for type checking private methods. I added private methods and private static methods into the same class entries that stores type signature of private fields, and then use these type signature information to resolve `GetPrivatePropT` and `PrivateMethodT`. I also ensured that unbinding private methods are also correctly errored on, similar to unbound public methods. Fixes #6254 #4872 #7877. Reviewed By: jbrown215 Differential Revision: D30023778 fbshipit-source-id: 71fae1a81d9b373f18b9ec4743380e846564a49f
Fixed in referenced commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calling private property failed with not existing method
https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVBTAHgBzgJwBcwBjGAQwGdKwBBMAb1QEgBiEuAWxwFdCMwAXjAAKcgEohAPkaow8sM3wZCPfADsw5MAGowARgDcchQF9jCsHOYBzFUNHkAXGEqF8AS3U3JgmU0t5ZVUNMEIACw9KADp2Ll5+MXELM2NTVCA
Also currently spec omits
this.
, but flow parser failed on unexpected#
https://github.com/tc39/proposal-private-fields#a-brief-introduction
https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVBTAHgBzgJwBcwBjGAQwGdKwBBMAb1QEgBiEuAWxwFdCMwAXjAAKcgEohAPkaow8sM3wZCPfADsw5MAGowARgDcchQF9jCsHOYBzFUNHkAXGEqF8AS3U3JgmU0t5ZVUNMHYuXn4xcQszY1NUIA
The text was updated successfully, but these errors were encountered: