Files

19 lines
402 B
TypeScript

//// [tests/cases/compiler/castOfYield.ts] ////
//// [castOfYield.ts]
function* f() {
<number> (yield 0);
// Unlike await, yield is not allowed to appear in a simple unary expression.
<number> yield 0;
}
//// [castOfYield.js]
"use strict";
function* f() {
(yield 0);
// Unlike await, yield is not allowed to appear in a simple unary expression.
;
yield 0;
}