-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Bug: Accessing protected members from a static function in a derived class is declined. #11832
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
Comments
Please see the linked issues. |
Okay, I see the point in #8512. I will discuss on there. |
Just thinking out loud here but if ECMAScript ever introduces nested, instance member classes, we could end up with something interesting like Scala's path-dependent types. |
Actually I suppose we already have that with class expressions. As much as I think classes are over used there is something really interesting about combining classes and closures... |
TypeScript Version: 2.0.3
Expected behavior: A static function in a class extending a class C can access all protected and public, but not private members of instances of C
Actual behavior: Protected members are not accessible,Compiler throws TS2446
For reference the simple case without inheritance, which works as expected:
The text was updated successfully, but these errors were encountered: