1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
=== tests/cases/conformance/types/typeRelationships/recursiveTypes/infiniteExpansionThroughTypeInference.ts ===
interface G<T> {
>G : Symbol(G, Decl(infiniteExpansionThroughTypeInference.ts, 0, 0))
>T : Symbol(T, Decl(infiniteExpansionThroughTypeInference.ts, 0, 12))
x: G<G<T>> // infinitely expanding type reference
>x : Symbol(G.x, Decl(infiniteExpansionThroughTypeInference.ts, 0, 16))
>G : Symbol(G, Decl(infiniteExpansionThroughTypeInference.ts, 0, 0))
>G : Symbol(G, Decl(infiniteExpansionThroughTypeInference.ts, 0, 0))
>T : Symbol(T, Decl(infiniteExpansionThroughTypeInference.ts, 0, 12))
y: T
>y : Symbol(G.y, Decl(infiniteExpansionThroughTypeInference.ts, 1, 14))
>T : Symbol(T, Decl(infiniteExpansionThroughTypeInference.ts, 0, 12))
}
function ff<T>(g: G<T>): void {
>ff : Symbol(ff, Decl(infiniteExpansionThroughTypeInference.ts, 3, 1))
>T : Symbol(T, Decl(infiniteExpansionThroughTypeInference.ts, 5, 12))
>g : Symbol(g, Decl(infiniteExpansionThroughTypeInference.ts, 5, 15))
>G : Symbol(G, Decl(infiniteExpansionThroughTypeInference.ts, 0, 0))
>T : Symbol(T, Decl(infiniteExpansionThroughTypeInference.ts, 5, 12))
ff(g) // when infering T here we need to make sure to not descend into the structure of G<T> infinitely
>ff : Symbol(ff, Decl(infiniteExpansionThroughTypeInference.ts, 3, 1))
>g : Symbol(g, Decl(infiniteExpansionThroughTypeInference.ts, 5, 15))
}
|