62 lines
850 B
Plaintext
62 lines
850 B
Plaintext
|
=== tests/cases/conformance/types/objectTypeLiteral/callSignatures/identicalCallSignatures.ts ===
|
||
|
// Each pair of call signatures in these types have a duplicate signature error.
|
||
|
// Identical call signatures should generate an error.
|
||
|
interface I {
|
||
|
>I : I
|
||
|
|
||
|
(x): number;
|
||
|
>x : any
|
||
|
|
||
|
(x: any): number;
|
||
|
>x : any
|
||
|
|
||
|
<T>(x: T): T;
|
||
|
>T : T
|
||
|
>x : T
|
||
|
>T : T
|
||
|
>T : T
|
||
|
|
||
|
<U>(x: U): U; // error
|
||
|
>U : U
|
||
|
>x : U
|
||
|
>U : U
|
||
|
>U : U
|
||
|
}
|
||
|
|
||
|
interface I2<T> {
|
||
|
>I2 : I2<T>
|
||
|
>T : T
|
||
|
|
||
|
(x: T): T;
|
||
|
>x : T
|
||
|
>T : T
|
||
|
>T : T
|
||
|
|
||
|
(x: T): T; // error
|
||
|
>x : T
|
||
|
>T : T
|
||
|
>T : T
|
||
|
}
|
||
|
|
||
|
var a: {
|
||
|
>a : { (x: any): number; (x: any): number; <T>(x: T): T; <T>(x: T): T; }
|
||
|
|
||
|
(x): number;
|
||
|
>x : any
|
||
|
|
||
|
(x: any): number;
|
||
|
>x : any
|
||
|
|
||
|
<T>(x: T): T;
|
||
|
>T : T
|
||
|
>x : T
|
||
|
>T : T
|
||
|
>T : T
|
||
|
|
||
|
<T>(x: T): T; // error
|
||
|
>T : T
|
||
|
>x : T
|
||
|
>T : T
|
||
|
>T : T
|
||
|
}
|