TypeScript/tests/cases/compiler/recursiveTypeParameterReferenceError2.ts

12 lines
223 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
interface List<T> {
data: T;
next: List<T>;
owner: List<List<T>>; // Error, recursive reference with wrapped T
}
interface List2<T> {
data: T;
next: List2<T>;
owner: List2<List2<string>>; // Ok
}