//@target: ES6 class Foo { x: number } class Baz { z: number } function* g(): IterableIterator { yield; yield new Baz; }