TypeScript/tests/cases/compiler/genericPrototypeProperty.ts

9 lines
140 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
class C<T> {
x: T;
foo(x: T): T { return null; }
}
var r = C.prototype;
// should be any
var r2 = r.x
var r3 = r.foo(null);