44 lines
2.1 KiB
Text
44 lines
2.1 KiB
Text
=== tests/cases/compiler/checkInfiniteExpansionTermination.ts ===
|
|
// Regression test for #1002
|
|
// Before fix this code would cause infinite loop
|
|
|
|
interface IObservable<T> {
|
|
>IObservable : IObservable<T>, Symbol(IObservable,Decl(checkInfiniteExpansionTermination.ts,0,0))
|
|
>T : T, Symbol(T,Decl(checkInfiniteExpansionTermination.ts,3,22))
|
|
|
|
n: IObservable<T[]>; // Needed, must be T[]
|
|
>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))
|
|
}
|
|
|
|
// Needed
|
|
interface ISubject<T> extends IObservable<T> { }
|
|
>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))
|
|
|
|
interface Foo { x }
|
|
>Foo : Foo, Symbol(Foo,Decl(checkInfiniteExpansionTermination.ts,8,48))
|
|
>x : any, Symbol(x,Decl(checkInfiniteExpansionTermination.ts,10,15))
|
|
|
|
interface Bar { y }
|
|
>Bar : Bar, Symbol(Bar,Decl(checkInfiniteExpansionTermination.ts,10,19))
|
|
>y : any, Symbol(y,Decl(checkInfiniteExpansionTermination.ts,11,15))
|
|
|
|
var values: IObservable<Foo>;
|
|
>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))
|
|
|
|
var values2: ISubject<Bar>;
|
|
>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))
|
|
|
|
values = values2;
|
|
>values = values2 : ISubject<Bar>
|
|
>values : IObservable<Foo>, Symbol(values,Decl(checkInfiniteExpansionTermination.ts,13,3))
|
|
>values2 : ISubject<Bar>, Symbol(values2,Decl(checkInfiniteExpansionTermination.ts,14,3))
|
|
|