tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(3,5): error TS1163: A 'yield' expression is only allowed in a generator body.


==== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts (1 errors) ====
    function* foo() {
      function bar() {
        yield foo;
        ~~~~~
!!! error TS1163: A 'yield' expression is only allowed in a generator body.
      }
    }