Closed
Description
TypeScript Version: 1.8.10
Code
// A *self-contained* demonstration of the problem follows...
abstract class A {
constructor() {
this.onCreate();
}
abstract onCreate();
}
class B extends A {
private field = 'foo';
onCreate() {
console.log(this.field);
this.field = 'bar';
}
echo () {
console.log(this.field);
}
}
let b: B = new B();
b.echo();
Expected behavior:
Console prints out:
foo
bar
Actual behavior:
Console prints out:
undefined
foo