2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/recursiveTypeParameterReferenceError2.ts ===
|
|
|
|
interface List<T> {
|
|
|
|
>List : List<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
data: T;
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
next: List<T>;
|
|
|
|
>next : List<T>
|
2014-08-19 04:56:03 +02:00
|
|
|
>List : List<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
|
|
|
|
owner: List<List<T>>; // Error, recursive reference with wrapped T
|
|
|
|
>owner : List<List<T>>
|
2014-08-19 04:56:03 +02:00
|
|
|
>List : List<T>
|
|
|
|
>List : List<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
|
|
|
|
interface List2<T> {
|
|
|
|
>List2 : List2<T>
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
data: T;
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
next: List2<T>;
|
|
|
|
>next : List2<T>
|
2014-08-19 04:56:03 +02:00
|
|
|
>List2 : List2<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
>T : T
|
|
|
|
|
|
|
|
owner: List2<List2<string>>; // Ok
|
|
|
|
>owner : List2<List2<string>>
|
2014-08-19 04:56:03 +02:00
|
|
|
>List2 : List2<T>
|
|
|
|
>List2 : List2<T>
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|