-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Woodpile37/TypeScript
#10Labels
BugA bug in TypeScriptA bug in TypeScriptBy DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead
Milestone
Description
class Base {
public a: string;
}
class Derived extends Base {
public b: string;
}
var a4: { [index: number]: Base };
var b4: { [index: string]: Derived };
var r1a1 = a4 < b4;Actual: no error
Expected: Operator '<' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: string]: Derived; }'.
The current behavior matches the old compiler because fixing this would be a breaking change we aligned them. Worth considering whether to just take the break since it's unlikely someone would take an intentional dependeny on this undefined behavior.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptBy DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead