Skip to content

The child class should not be able to access the class field defined by the parent class via super #54054

Description

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

classT{field=()=>{}}classT2extendsT{f(){super.field()// ~~~~~~~~~~~}}newT2().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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions