Skip to content

No error for wrong overloads with computed properties #8706

Description

@zhuravlikjb

In the following example, the compiler yields only one error, though all the three cases are incorrect:

class Foo {
    a();
    b() { }
}


class Bar {
    ["a"]();
    ["b"]() {}
}

class Baz {
    [Symbol.hasInstance]();
    [Symbol.iterator]() { }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    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