Skip to content

super() must not be called many times #23422

Closed
@falsandtru

Description

@falsandtru

Calling super() twice makes a runtime error.

TypeScript Version: 2.7.0-dev.201xxxxx

Search Terms:

Code

class C extends Object {
  constructor() {
    super();
    super();
  }
}

Expected behavior:

error

Actual behavior:

pass

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Out of ScopeThis idea sits outside of the TypeScript language design constraints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions