33 lines
978 B
Text
33 lines
978 B
Text
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck45.ts ===
|
|
declare function foo<T, U>(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) => T): T;
|
|
>foo : <T, U>(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) => T) => T
|
|
>T : T
|
|
>U : U
|
|
>x : T
|
|
>T : T
|
|
>fun : () => Iterator<(x: T) => U>
|
|
>Iterator : Iterator<T>
|
|
>x : T
|
|
>T : T
|
|
>U : U
|
|
>fun2 : (y: U) => T
|
|
>y : U
|
|
>U : U
|
|
>T : T
|
|
>T : T
|
|
|
|
foo("", function* () { yield x => x.length }, p => undefined); // T is fixed, should be string
|
|
>foo("", function* () { yield x => x.length }, p => undefined) : string
|
|
>foo : <T, U>(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) => T) => T
|
|
>"" : string
|
|
>function* () { yield x => x.length } : () => IterableIterator<(x: string) => number>
|
|
>yield x => x.length : any
|
|
>x => x.length : (x: string) => number
|
|
>x : string
|
|
>x.length : number
|
|
>x : string
|
|
>length : number
|
|
>p => undefined : (p: number) => any
|
|
>p : number
|
|
>undefined : undefined
|
|
|