TypeScript/tests/baselines/reference/generatorTypeCheck23.errors.txt
Jason Freeman cf4ca1fc3c Merge branch 'master' of https://github.com/Microsoft/TypeScript into generators
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
2015-05-06 11:42:26 -07:00

17 lines
595 B
Plaintext

tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck23.ts(4,11): error TS2504: No best common type exists among yield expressions.
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck23.ts (1 errors) ====
class Foo { x: number }
class Bar extends Foo { y: string }
class Baz { z: number }
function* g3() {
~~
!!! error TS2504: No best common type exists among yield expressions.
yield;
yield new Foo;
yield new Bar;
yield new Baz;
yield *[new Bar];
yield *[new Baz];
}