Repository navigation
A private or protected member used from outside its class is one error, in tsc's words - #1133
Merged
Merged
Conversation
…r, in tsc's words `t.v` of `constructor(private v: number)` gave four errors: "Class member "v" is not accessable", then "can't resolve property/field/base", "Class member 'v' can't be found" and "Can't resolve property 'v' of type T". Now it is "Property 'v' is private and only accessible within class 'T'" (protected: "... and its subclasses") for fields, methods, static fields, stores and `t?.v`, and the lookups after it say nothing more of that access. "Class constructor is not accessible" is spelled right. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
t.vofconstructor(private v: number)used to give four errors for one access:Now it gives one:
Property 'v' is private and only accessible within class 'T'. A protected member gets... and its subclassesadded. This covers fields, methods, static fields, stores andt?.v. The lookups that run after a denied access stay quiet (the field path uses the property-access logic's flag; the method and static paths compare the access's location). Thet?.vtrial lookup ignores its own errors, so this path repeats the stored message. "Class constructor is not accessible" now has the right spelling.Tests:
access-errors/has six cases. Each one fails if any follow-up error appears. Full ctest passes: 10556/10556.🤖 Generated with Claude Code