49 lines
823 B
Plaintext
49 lines
823 B
Plaintext
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck24.ts ===
|
|
class Foo { x: number }
|
|
>Foo : Foo
|
|
>x : number
|
|
|
|
class Bar extends Foo { y: string }
|
|
>Bar : Bar
|
|
>Foo : Foo
|
|
>y : string
|
|
|
|
class Baz { z: number }
|
|
>Baz : Baz
|
|
>z : number
|
|
|
|
function* g3() {
|
|
>g3 : () => IterableIterator<Foo | Baz>
|
|
|
|
yield;
|
|
>yield : any
|
|
|
|
yield * [new Foo];
|
|
>yield * [new Foo] : any
|
|
>[new Foo] : Foo[]
|
|
>new Foo : Foo
|
|
>Foo : typeof Foo
|
|
|
|
yield new Bar;
|
|
>yield new Bar : any
|
|
>new Bar : Bar
|
|
>Bar : typeof Bar
|
|
|
|
yield new Baz;
|
|
>yield new Baz : any
|
|
>new Baz : Baz
|
|
>Baz : typeof Baz
|
|
|
|
yield *[new Bar];
|
|
>yield *[new Bar] : any
|
|
>[new Bar] : Bar[]
|
|
>new Bar : Bar
|
|
>Bar : typeof Bar
|
|
|
|
yield *[new Baz];
|
|
>yield *[new Baz] : any
|
|
>[new Baz] : Baz[]
|
|
>new Baz : Baz
|
|
>Baz : typeof Baz
|
|
}
|