Bug Report
The child class should not be able to access the class field defined by the parent class via super
🔎 Search Terms
class field super parent
🕗 Version & Regression Information
Happens on 5.1.0-beta
⏯ Playground Link
Playground link with relevant code
💻 Code
class T {
field = () => {}
}
class T2 extends T {
f() {
super.field()
// ~~~~~~~~~~~
}
}
new T2().f()
🙁 Actual behavior
No type error
🙂 Expected behavior
Type error.
super will look for the parent class, but the class field is always defined on the current instance.