33 lines
553 B
Text
33 lines
553 B
Text
=== tests/cases/compiler/overloadEquivalenceWithStatics.ts ===
|
|
class A1<T> {
|
|
>A1 : A1<T>
|
|
>T : T
|
|
|
|
static B<S>(v: A1<S>): A1<S>; // 1
|
|
>B : { <S>(v: A1<S>): A1<S>; <S>(v: S): A1<S>; }
|
|
>S : S
|
|
>v : A1<S>
|
|
>A1 : A1<T>
|
|
>S : S
|
|
>A1 : A1<T>
|
|
>S : S
|
|
|
|
static B<S>(v: S): A1<S>; // 2 : Error Duplicate signature
|
|
>B : { <S>(v: A1<S>): A1<S>; <S>(v: S): A1<S>; }
|
|
>S : S
|
|
>v : S
|
|
>S : S
|
|
>A1 : A1<T>
|
|
>S : S
|
|
|
|
static B<S>(v: any): A1<S> {
|
|
>B : { <S>(v: A1<S>): A1<S>; <S>(v: S): A1<S>; }
|
|
>S : S
|
|
>v : any
|
|
>A1 : A1<T>
|
|
>S : S
|
|
|
|
return null;
|
|
}
|
|
}
|
|
|