You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Just for reference... the error here is correct and expectedfunction*foo(){!yield42;// ERROR: Expression expected}// This one emits bad code...asyncfunctionbar(){!await42;// OK}// ----------// generated .js code for the bar function:functionbar(){return__awaiter(this,void0,void0,function*(){!yield42;// <===== (1) bad emit here});}
Expected behavior:
The emitted code is valid.
Actual behavior:
The emitted code is invalid at (1). !yield 42 is not a valid expression as demonstrated in the foo function. Also the generated code fails at runtime at (1) in both V8 and Edge.
I think this might have been surfaced by #9890? A few days ago in 2.1.0-dev.20160818, the !await 42 expression would not compile anyway, so the emitted code didn't matter, but now I guess it does.
Activity
yortus commentedon Aug 22, 2016
I think this might have been surfaced by #9890? A few days ago in
2.1.0-dev.20160818, the!await 42expression would not compile anyway, so the emitted code didn't matter, but now I guess it does.