Skip to content

Handle computed property names in overloads #17345

@ghost

Description

TypeScript Version: nightly (2.5.0-dev.20170719)

Code

class C {
    ["foo"](): void
    ["bar"](): void;
    ["foo"]() {
        return 0;
    }
}

Expected behavior:

An error: the overload is being called "bar" where it should be "foo".

Actual behavior:

No error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions