TypeScript/tests/baselines/reference/checkInfiniteExpansionTermination2.types

47 lines
2.8 KiB
Plaintext
Raw Normal View History

=== tests/cases/compiler/checkInfiniteExpansionTermination2.ts ===
// Regression test for #1002
// Before fix this code would cause infinite loop
interface IObservable<T> {
2015-04-13 23:01:57 +02:00
>IObservable : IObservable<T>, Symbol(IObservable, Decl(checkInfiniteExpansionTermination2.ts, 0, 0))
>T : T, Symbol(T, Decl(checkInfiniteExpansionTermination2.ts, 3, 22))
n: IObservable<T[]>;
2015-04-13 23:01:57 +02:00
>n : IObservable<T[]>, Symbol(n, Decl(checkInfiniteExpansionTermination2.ts, 3, 26))
>IObservable : IObservable<T>, Symbol(IObservable, Decl(checkInfiniteExpansionTermination2.ts, 0, 0))
>T : T, Symbol(T, Decl(checkInfiniteExpansionTermination2.ts, 3, 22))
}
interface ISubject<T> extends IObservable<T> { }
2015-04-13 23:01:57 +02:00
>ISubject : ISubject<T>, Symbol(ISubject, Decl(checkInfiniteExpansionTermination2.ts, 5, 1))
>T : T, Symbol(T, Decl(checkInfiniteExpansionTermination2.ts, 6, 19))
>IObservable : IObservable<T>, Symbol(IObservable, Decl(checkInfiniteExpansionTermination2.ts, 0, 0))
>T : T, Symbol(T, Decl(checkInfiniteExpansionTermination2.ts, 6, 19))
declare function combineLatest<TOther>(x: IObservable<TOther>[]): void;
2015-04-13 23:01:57 +02:00
>combineLatest : { <TOther>(x: IObservable<TOther>[]): void; (): void; }, Symbol(combineLatest, Decl(checkInfiniteExpansionTermination2.ts, 6, 48), Decl(checkInfiniteExpansionTermination2.ts, 8, 71))
>TOther : TOther, Symbol(TOther, Decl(checkInfiniteExpansionTermination2.ts, 8, 31))
>x : IObservable<TOther>[], Symbol(x, Decl(checkInfiniteExpansionTermination2.ts, 8, 39))
>IObservable : IObservable<T>, Symbol(IObservable, Decl(checkInfiniteExpansionTermination2.ts, 0, 0))
>TOther : TOther, Symbol(TOther, Decl(checkInfiniteExpansionTermination2.ts, 8, 31))
declare function combineLatest(): void;
2015-04-13 23:01:57 +02:00
>combineLatest : { <TOther>(x: IObservable<TOther>[]): void; (): void; }, Symbol(combineLatest, Decl(checkInfiniteExpansionTermination2.ts, 6, 48), Decl(checkInfiniteExpansionTermination2.ts, 8, 71))
function fn<T>() {
2015-04-13 23:01:57 +02:00
>fn : <T>() => void, Symbol(fn, Decl(checkInfiniteExpansionTermination2.ts, 9, 39))
>T : T, Symbol(T, Decl(checkInfiniteExpansionTermination2.ts, 11, 12))
var values: ISubject<any>[] = [];
2015-04-13 23:01:57 +02:00
>values : ISubject<any>[], Symbol(values, Decl(checkInfiniteExpansionTermination2.ts, 12, 7))
>ISubject : ISubject<T>, Symbol(ISubject, Decl(checkInfiniteExpansionTermination2.ts, 5, 1))
>[] : undefined[]
// Hang when using <T>, but not <any>
combineLatest<T>(values);
>combineLatest<T>(values) : void
2015-04-13 23:01:57 +02:00
>combineLatest : { <TOther>(x: IObservable<TOther>[]): void; (): void; }, Symbol(combineLatest, Decl(checkInfiniteExpansionTermination2.ts, 6, 48), Decl(checkInfiniteExpansionTermination2.ts, 8, 71))
>T : T, Symbol(T, Decl(checkInfiniteExpansionTermination2.ts, 11, 12))
>values : ISubject<any>[], Symbol(values, Decl(checkInfiniteExpansionTermination2.ts, 12, 7))
}