2014-10-31 22:23:29 +01:00
|
|
|
=== tests/cases/compiler/checkInfiniteExpansionTermination.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(checkInfiniteExpansionTermination.ts, 0, 0))
|
|
|
|
>T : T, Symbol(T, Decl(checkInfiniteExpansionTermination.ts, 3, 22))
|
2014-10-31 22:23:29 +01:00
|
|
|
|
|
|
|
n: IObservable<T[]>; // Needed, must be T[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>n : IObservable<T[]>, Symbol(n, Decl(checkInfiniteExpansionTermination.ts, 3, 26))
|
|
|
|
>IObservable : IObservable<T>, Symbol(IObservable, Decl(checkInfiniteExpansionTermination.ts, 0, 0))
|
|
|
|
>T : T, Symbol(T, Decl(checkInfiniteExpansionTermination.ts, 3, 22))
|
2014-10-31 22:23:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Needed
|
|
|
|
interface ISubject<T> extends IObservable<T> { }
|
2015-04-13 23:01:57 +02:00
|
|
|
>ISubject : ISubject<T>, Symbol(ISubject, Decl(checkInfiniteExpansionTermination.ts, 5, 1))
|
|
|
|
>T : T, Symbol(T, Decl(checkInfiniteExpansionTermination.ts, 8, 19))
|
|
|
|
>IObservable : IObservable<T>, Symbol(IObservable, Decl(checkInfiniteExpansionTermination.ts, 0, 0))
|
|
|
|
>T : T, Symbol(T, Decl(checkInfiniteExpansionTermination.ts, 8, 19))
|
2014-10-31 22:23:29 +01:00
|
|
|
|
|
|
|
interface Foo { x }
|
2015-04-13 23:01:57 +02:00
|
|
|
>Foo : Foo, Symbol(Foo, Decl(checkInfiniteExpansionTermination.ts, 8, 48))
|
|
|
|
>x : any, Symbol(x, Decl(checkInfiniteExpansionTermination.ts, 10, 15))
|
2014-10-31 22:23:29 +01:00
|
|
|
|
|
|
|
interface Bar { y }
|
2015-04-13 23:01:57 +02:00
|
|
|
>Bar : Bar, Symbol(Bar, Decl(checkInfiniteExpansionTermination.ts, 10, 19))
|
|
|
|
>y : any, Symbol(y, Decl(checkInfiniteExpansionTermination.ts, 11, 15))
|
2014-10-31 22:23:29 +01:00
|
|
|
|
|
|
|
var values: IObservable<Foo>;
|
2015-04-13 23:01:57 +02:00
|
|
|
>values : IObservable<Foo>, Symbol(values, Decl(checkInfiniteExpansionTermination.ts, 13, 3))
|
|
|
|
>IObservable : IObservable<T>, Symbol(IObservable, Decl(checkInfiniteExpansionTermination.ts, 0, 0))
|
|
|
|
>Foo : Foo, Symbol(Foo, Decl(checkInfiniteExpansionTermination.ts, 8, 48))
|
2014-10-31 22:23:29 +01:00
|
|
|
|
|
|
|
var values2: ISubject<Bar>;
|
2015-04-13 23:01:57 +02:00
|
|
|
>values2 : ISubject<Bar>, Symbol(values2, Decl(checkInfiniteExpansionTermination.ts, 14, 3))
|
|
|
|
>ISubject : ISubject<T>, Symbol(ISubject, Decl(checkInfiniteExpansionTermination.ts, 5, 1))
|
|
|
|
>Bar : Bar, Symbol(Bar, Decl(checkInfiniteExpansionTermination.ts, 10, 19))
|
2014-10-31 22:23:29 +01:00
|
|
|
|
|
|
|
values = values2;
|
|
|
|
>values = values2 : ISubject<Bar>
|
2015-04-13 23:01:57 +02:00
|
|
|
>values : IObservable<Foo>, Symbol(values, Decl(checkInfiniteExpansionTermination.ts, 13, 3))
|
|
|
|
>values2 : ISubject<Bar>, Symbol(values2, Decl(checkInfiniteExpansionTermination.ts, 14, 3))
|
2014-10-31 22:23:29 +01:00
|
|
|
|