function foo1(f: T) { return f(); // should return 'string', once returned 'any' } function foo2(f: T) { return new f(); // should be legal, once was an error }