TypeScript/tests/cases/compiler/extendNonClassSymbol2.ts

5 lines
159 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
function Foo() {
this.x = 1;
}
var x = new Foo(); // legal, considered a constructor function
class C extends Foo {} // error, could not find symbol Foo