TypeScript/tests/baselines/reference/identicalCallSignatures.js

25 lines
473 B
JavaScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [identicalCallSignatures.ts]
// Each pair of call signatures in these types have a duplicate signature error.
// Identical call signatures should generate an error.
interface I {
(x): number;
(x: any): number;
<T>(x: T): T;
<U>(x: U): U; // error
}
interface I2<T> {
(x: T): T;
(x: T): T; // error
}
var a: {
(x): number;
(x: any): number;
<T>(x: T): T;
<T>(x: T): T; // error
}
//// [identicalCallSignatures.js]
var a;