2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/conformance/types/typeRelationships/recursiveTypes/nominalSubtypeCheckOfTypeParameter2.ts ===
|
|
|
|
interface B<T> {
|
|
|
|
>B : B<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
bar: T;
|
|
|
|
>bar : T
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
// ok
|
|
|
|
interface A<T> extends B<T> {
|
|
|
|
>A : A<T>
|
|
|
|
>T : T
|
2014-08-19 04:56:03 +02:00
|
|
|
>B : B<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
|
|
|
|
foo: T;
|
|
|
|
>foo : T
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
// ok
|
|
|
|
interface A2<T> extends B<B<string>> {
|
|
|
|
>A2 : A2<T>
|
|
|
|
>T : T
|
2014-08-19 04:56:03 +02:00
|
|
|
>B : B<T>
|
|
|
|
>B : B<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
baz: T;
|
|
|
|
>baz : T
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
interface C<T> {
|
|
|
|
>C : C<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
bam: T;
|
|
|
|
>bam : T
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
// ok
|
|
|
|
interface A3<T> extends B<C<T>> {
|
|
|
|
>A3 : A3<T>
|
|
|
|
>T : T
|
2014-08-19 04:56:03 +02:00
|
|
|
>B : B<T>
|
|
|
|
>C : C<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
|
|
|
|
bing: T;
|
|
|
|
>bing : T
|
|
|
|
>T : T
|
|
|
|
}
|