facebookarchive/prepack
View on GitHubPrepack emits yield outside of generator function
Open
#2294 opened on Jul 18, 2018
bughelp wantedlevel 2 (easy)
Description
Input
"use strict";
var object = {
*["a"]() {
yield 1;
yield 2;
},
};
var x = Object.keys(object);
Output
"use strict";
var x, object;
(function () {
var _$0 = this;
var _3 = function () {
yield 1; // <---------------------------------- Yield outside of generator!
yield 2;
};
_$0.object = {
a: _3
};
_$0.x = ["a"];
}).call(this);