-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Merged external modules break protected member access checking #6731
Comments
this is not specific to module augmentations and can be reproduced with two script files: // file1.ts
class A {
protected protected: any;
public setProtected(val: any) {
this.protected = val;
}
} // file2.ts
interface A { } |
@vladima Not sure if this is related, but overrides of protected members are still broken:
This results in:
|
the crux of the problem is the same but in different part of the checker - have a fix for it. |
filed #6762 to track it. |
Having some difficulty utilizing the external module augmentations feature merged in #6213. Here is a test case to demonstrate the problem:
This results in the following error:
It looks like the problem is that
checkClassPropertyAccess
in checker.ts ends up obtaining the merged interface as the enclosing class of the property access, rather than the actual enclosing class, then tries to ensure that this interface is derived from the class which declares the property, which isn't the case.The text was updated successfully, but these errors were encountered: