2015-05-06 20:42:26 +02:00
|
|
|
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck54.ts(3,11): error TS2504: No best common type exists among yield expressions.
|
2015-05-06 01:54:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck54.ts (1 errors) ====
|
|
|
|
class Foo { x: number }
|
|
|
|
class Baz { z: number }
|
|
|
|
function* g() {
|
|
|
|
~
|
2015-05-06 20:42:26 +02:00
|
|
|
!!! error TS2504: No best common type exists among yield expressions.
|
2015-05-06 01:54:51 +02:00
|
|
|
yield* [new Foo];
|
|
|
|
yield* [new Baz];
|
|
|
|
}
|