tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts(4,5): error TS2322: Type '() => Generator<Bar | Baz, void, undefined>' is not assignable to type '() => Iterable<Foo>'.
  Type 'Generator<Bar | Baz, void, undefined>' is not assignable to type 'Iterable<Foo>'.
    Types of property '[Symbol.iterator]' are incompatible.
      Type '() => Generator<Bar | Baz, void, undefined>' is not assignable to type '() => Iterator<Foo, any, undefined>'.
        Type 'Generator<Bar | Baz, void, undefined>' is not assignable to type 'Iterator<Foo, any, undefined>'.
          Types of property 'next' are incompatible.
            Type '(...args: [] | [undefined]) => IteratorResult<Bar | Baz, void>' is not assignable to type '(...args: [] | [undefined]) => IteratorResult<Foo, any>'.
              Type 'IteratorResult<Bar | Baz, void>' is not assignable to type 'IteratorResult<Foo, any>'.
                Type 'IteratorYieldResult<Bar | Baz>' is not assignable to type 'IteratorResult<Foo, any>'.
                  Type 'IteratorYieldResult<Bar | Baz>' is not assignable to type 'IteratorYieldResult<Foo>'.
                    Type 'Bar | Baz' is not assignable to type 'Foo'.
                      Property 'x' is missing in type 'Baz' but required in type 'Foo'.


==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts (1 errors) ====
    class Foo { x: number }
    class Bar extends Foo { y: string }
    class Baz { z: number }
    var g3: () => Iterable<Foo> = function* () {
        ~~
!!! error TS2322: Type '() => Generator<Bar | Baz, void, undefined>' is not assignable to type '() => Iterable<Foo>'.
!!! error TS2322:   Type 'Generator<Bar | Baz, void, undefined>' is not assignable to type 'Iterable<Foo>'.
!!! error TS2322:     Types of property '[Symbol.iterator]' are incompatible.
!!! error TS2322:       Type '() => Generator<Bar | Baz, void, undefined>' is not assignable to type '() => Iterator<Foo, any, undefined>'.
!!! error TS2322:         Type 'Generator<Bar | Baz, void, undefined>' is not assignable to type 'Iterator<Foo, any, undefined>'.
!!! error TS2322:           Types of property 'next' are incompatible.
!!! error TS2322:             Type '(...args: [] | [undefined]) => IteratorResult<Bar | Baz, void>' is not assignable to type '(...args: [] | [undefined]) => IteratorResult<Foo, any>'.
!!! error TS2322:               Type 'IteratorResult<Bar | Baz, void>' is not assignable to type 'IteratorResult<Foo, any>'.
!!! error TS2322:                 Type 'IteratorYieldResult<Bar | Baz>' is not assignable to type 'IteratorResult<Foo, any>'.
!!! error TS2322:                   Type 'IteratorYieldResult<Bar | Baz>' is not assignable to type 'IteratorYieldResult<Foo>'.
!!! error TS2322:                     Type 'Bar | Baz' is not assignable to type 'Foo'.
!!! error TS2322:                       Property 'x' is missing in type 'Baz' but required in type 'Foo'.
!!! related TS2728 tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck25.ts:1:13: 'x' is declared here.
        yield;
        yield new Bar;
        yield new Baz;
        yield *[new Bar];
        yield *[new Baz];
    }