2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/mutuallyRecursiveGenericBaseTypes1.ts ===
|
|
|
|
interface A<T> {
|
|
|
|
>A : A<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
foo(): B<T>; // instead of B does see this
|
|
|
|
>foo : { (): B<T>; (): void; }
|
2014-08-19 04:56:03 +02:00
|
|
|
>B : B<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
|
|
|
|
foo(): void; // instead of B does see this
|
|
|
|
>foo : { (): B<T>; (): void; }
|
|
|
|
|
|
|
|
foo2(): B<number>;
|
|
|
|
>foo2 : () => B<number>
|
2014-08-19 04:56:03 +02:00
|
|
|
>B : B<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
interface B<T> extends A<T> {
|
|
|
|
>B : B<T>
|
|
|
|
>T : T
|
2014-08-19 04:56:03 +02:00
|
|
|
>A : A<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
|
|
|
|
bar(): void;
|
|
|
|
>bar : () => void
|
|
|
|
}
|
|
|
|
|
|
|
|
var b: B<number>;
|
|
|
|
>b : B<number>
|
2014-08-19 04:56:03 +02:00
|
|
|
>B : B<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
b.foo(); // should not error
|
|
|
|
>b.foo() : B<number>
|
|
|
|
>b.foo : { (): B<number>; (): void; }
|
|
|
|
>b : B<number>
|
|
|
|
>foo : { (): B<number>; (): void; }
|
|
|
|
|
|
|
|
|
|
|
|
|