Skip to content

new super() in static method does not cause errorย #63451

@Withered-Flower-0422

Description

@Withered-Flower-0422

๐Ÿ”Ž Search Terms

super

๐Ÿ•— Version & Regression Information

This exists in ts6.0

โฏ Playground Link

No response

๐Ÿ’ป Code

class A extends class {} {
    static {
        new super()
    }

    static f() {
        new super()
    }
}

๐Ÿ™ Actual behavior

no error

๐Ÿ™‚ Expected behavior

new super() is invalid and should throw error.

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions