fix for-of loop with const iterator (#1899)
This commit is contained in:
@@ -1785,7 +1785,7 @@ function parse($TEXT, options) {
|
||||
name : as_symbol(sym_type),
|
||||
value : is("operator", "=")
|
||||
? (next(), expression(false, no_in))
|
||||
: kind === "const" && S.input.has_directive("use strict")
|
||||
: !no_in && kind === "const" && S.input.has_directive("use strict")
|
||||
? croak("Missing initializer in const declaration") : null,
|
||||
end : prev()
|
||||
})
|
||||
@@ -1814,10 +1814,10 @@ function parse($TEXT, options) {
|
||||
});
|
||||
};
|
||||
|
||||
var const_ = function() {
|
||||
var const_ = function(no_in) {
|
||||
return new AST_Const({
|
||||
start : prev(),
|
||||
definitions : vardefs(false, "const"),
|
||||
definitions : vardefs(no_in, "const"),
|
||||
end : prev()
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user