Files
test-repo/tests/immutable_methods/test.js
T

9 lines
177 B
JavaScript
Raw Normal View History

2016-12-23 19:31:38 +00:00
class A {
foo(): A { return this; }
}
class B extends A {
foo(): B { return this; }
}
class C extends A {}
var a: A = new B();
a.foo = function(): C { return new C(); }