Closed
Description
Sorry it's me again....
it seems this type is resolved too eagerly in parent class.
TypeScript Version: nightly
Code
class A {
prop: {}
propCopy: this['prop']
}
class B extends A {
prop: {field: number}
propCopy2: this['prop']
}
var b = new B
b.propCopy.field // error here
b.propCopy2.field
Expected behavior:
Code should compile. both propCopy
and propCopy2
have the same type.
Actual behavior:
Error on b.propCopy.field
, b.propCopy
is typed as {}
Metadata
Metadata
Assignees
Labels
No labels