Closed

Description
TypeScript Version: 2.8.0-dev.20180302
Code
function* f() {
yield 0;
return "";
}
for (const x of f()) {
const n: number = x;
}
Expected behavior:
No error.
Actual behavior:
src/a.ts(7,11): error TS2322: Type '"" | 0' is not assignable to type 'number'.
Type '""' is not assignable to type 'number'.