=== tests/cases/compiler/functionOverloadsRecursiveGenericReturnType.ts === class B{ >B : B >V : V private id: V; >id : V >V : V } class A{ >A : A >U : U GetEnumerator: () => B; >GetEnumerator : () => B >B : B >U : U } function Choice(args: T[]): A; >Choice : { (args: T[]): A; (...v_args: T[]): A; } >T : T >args : T[] >T : T >A : A >T : T function Choice(...v_args: T[]): A; >Choice : { (args: T[]): A; (...v_args: T[]): A; } >T : T >v_args : T[] >T : T >A : A >T : T function Choice(...v_args: any[]): A{ >Choice : { (args: T[]): A; (...v_args: T[]): A; } >T : T >v_args : any[] >A : A >T : T return new A(); >new A() : A >A : typeof A >T : T }