Bug Report
π Search Terms
mismatched overload names
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ
β― Playground Link
Playground link with relevant code
π» Code
class Person {
["B"](a: number): string;
["A"](a: string|number): number | string {
return 0;
}
}
let p = new Person();
p.A(0)
// Runtime erorr
p.B(0)
π Actual behavior
Runtime error, on p.B since that member does not actually exist.
π Expected behavior
Compile time error when declaring overloads on methods with computed names and the overload names don't match
Notes
- Seems to happen with other types of computed properties such as symbols.
- Was not found in actual code I was just tinkering with
isolatedDeclarations.
Bug Report
π Search Terms
mismatched overload names
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Runtime error, on
p.Bsince that member does not actually exist.π Expected behavior
Compile time error when declaring overloads on methods with computed names and the overload names don't match
Notes
isolatedDeclarations.