-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeBugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: 2.4.0
Code
function base<T>() {
class Base {
static prop: T;
}
return Base;
}
class Gen<T> extends base<T>() {}
class Spec extends Gen<string> {}
<string>Spec.prop;
Expected behavior: Either the static property prop
is of type string or I'm given an error to prevent this happening earlier with clear error message.
Actual behavior: It claims that prop
is of type T
.
jcalz
Metadata
Metadata
Assignees
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeBugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue