45 lines
1 KiB
Plaintext
45 lines
1 KiB
Plaintext
|
=== tests/cases/compiler/recursiveTypeComparison.ts ===
|
||
|
// Before fix this would take an exceeding long time to complete (#1170)
|
||
|
|
||
|
interface Observable<T> {
|
||
|
>Observable : Observable<T>
|
||
|
>T : T
|
||
|
|
||
|
// This member can't be of type T, Property<T>, or Observable<anything but T>
|
||
|
needThisOne: Observable<T>;
|
||
|
>needThisOne : Observable<T>
|
||
|
>Observable : Observable<T>
|
||
|
>T : T
|
||
|
|
||
|
// Add more to make it slower
|
||
|
expo1: Property<T[]>; // 0.31 seconds in check
|
||
|
>expo1 : Property<T[]>
|
||
|
>Property : Property<T>
|
||
|
>T : T
|
||
|
|
||
|
expo2: Property<T[]>; // 3.11 seconds
|
||
|
>expo2 : Property<T[]>
|
||
|
>Property : Property<T>
|
||
|
>T : T
|
||
|
|
||
|
expo3: Property<T[]>; // 82.28 seconds
|
||
|
>expo3 : Property<T[]>
|
||
|
>Property : Property<T>
|
||
|
>T : T
|
||
|
}
|
||
|
interface Property<T> extends Observable<T> { }
|
||
|
>Property : Property<T>
|
||
|
>T : T
|
||
|
>Observable : Observable<T>
|
||
|
>T : T
|
||
|
|
||
|
var p: Observable<{}>;
|
||
|
>p : Observable<{}>
|
||
|
>Observable : Observable<T>
|
||
|
|
||
|
var stuck: Property<number> = p;
|
||
|
>stuck : Property<number>
|
||
|
>Property : Property<T>
|
||
|
>p : Observable<{}>
|
||
|
|