2014-07-13 01:04:16 +02:00
|
|
|
//// [callOnInstance.ts]
|
|
|
|
declare function D(): string;
|
|
|
|
|
|
|
|
declare class D { constructor (value: number); } // Duplicate identifier
|
|
|
|
|
|
|
|
var s1: string = D(); // OK
|
|
|
|
|
|
|
|
var s2: string = (new D(1))();
|
|
|
|
|
|
|
|
declare class C { constructor(value: number); }
|
|
|
|
(new C(1))(); // Error for calling an instance
|
|
|
|
|
|
|
|
//// [callOnInstance.js]
|
2014-08-15 22:18:54 +02:00
|
|
|
var s1 = D(); // OK
|
2014-07-13 01:04:16 +02:00
|
|
|
var s2 = (new D(1))();
|
2014-08-16 00:49:09 +02:00
|
|
|
(new C(1))(); // Error for calling an instance
|