Skip to content

Protected accessibility check does not state that instance members are accessible through derived classes #729

Closed
@mhegazy

Description

@mhegazy

In section 8.2.2,

Protected property members can be accessed only within their declaring class and classes derived from their declaring class, and a protected instance property member must be accessed through an instance of the enclosing class

it does not mention accessing through a sub class of the enclosing class. the explanation paragraph later on states it, but for the sake of completeness we should add it, to be

Protected property members can be accessed only within their declaring class and classes derived from their declaring class, and a protected instance property member must be accessed through an instance of the enclosing class or a sub class of the enclosing class.

Related to #700

Metadata

Metadata

Assignees

Labels

SpecIssues related to the TypeScript language specification

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions