opened
trusktr
username_0
In the above example, if the types agree in the subclasses, we can let it work, and throw a runtime error only when there is a type mismatch. But suppose in my above example that `Scene` and `Node` don't modify the inherited protected type, and only read it or set it. The compiler can easily ensure that things are okay.
- disallow subclasses to modify types of inherited members
  - perhaps allow them to do it only with a compiler option
- Follow the same rules as public, which is not guarded against this. An invariant problem can happen across siblings inheriting and modifying the member from the base class, yet the compiler will not stop it.
 - another compiler option

Mainly, my reasoning above is that there is a way to make it work with some semantics, and it is okay if those are specific to TypeScript.

## Checklist

My suggestion meets these guidelines:

* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code _**not sure**_
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

**Related Issues:** 

- https://github.com/Microsoft/TypeScript/issues/1
- https://github.com/Microsoft/TypeScript/issues/8512
- https://github.com/Microsoft/TypeScript/issues/10637
- https://github.com/Microsoft/TypeScript/issues/11278
- https://github.com/Microsoft/TypeScript/issues/11832
- https://github.com/Microsoft/TypeScript/issues/22900
Feature Request: access inherited protected member in subclasses branched from a base class where the protected member is defined in the base class
issue