TypeScript/tests/baselines/reference/generatorTypeCheck18.errors.txt
2015-05-04 16:15:55 -07:00

14 lines
No EOL
565 B
Text

tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck18.ts(5,11): error TS2322: Type 'Baz' is not assignable to type 'Foo'.
Property 'x' is missing in type 'Baz'.
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck18.ts (1 errors) ====
class Foo { x: number }
class Baz { z: number }
function* g(): IterableIterator<Foo> {
yield;
yield new Baz;
~~~~~~~
!!! error TS2322: Type 'Baz' is not assignable to type 'Foo'.
!!! error TS2322: Property 'x' is missing in type 'Baz'.
}