Index: src/parsing/preparser.h |
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h |
index cea907fbe8062645ba8ea7b92e686d84bf27d535..f3dbec0fa4a7669b6af3a3f34f311bdb759ecd71 100644 |
--- a/src/parsing/preparser.h |
+++ b/src/parsing/preparser.h |
@@ -574,7 +574,7 @@ |
struct PreParserFormalParameters : FormalParametersBase { |
- explicit PreParserFormalParameters(DeclarationScope* scope) |
+ explicit PreParserFormalParameters(Scope* scope) |
: FormalParametersBase(scope) {} |
int arity = 0; |
@@ -920,8 +920,7 @@ |
int initializer_end_position, bool is_rest) { |
++parameters->arity; |
} |
- void DeclareFormalParameter(DeclarationScope* scope, |
- PreParserIdentifier parameter, |
+ void DeclareFormalParameter(Scope* scope, PreParserIdentifier parameter, |
Type::ExpressionClassifier* classifier) { |
if (!classifier->is_simple_parameter_list()) { |
scope->SetHasNonSimpleParameters(); |
@@ -1046,7 +1045,9 @@ |
// ModuleDeclarationInstantiation for Source Text Module Records creates a |
// new Module Environment Record whose outer lexical environment record is |
// the global scope. |
- if (is_module) scope = NewModuleScope(scope); |
+ if (is_module) { |
+ scope = NewScopeWithParent(scope, MODULE_SCOPE); |
+ } |
FunctionState top_scope(&function_state_, &scope_state_, scope, |
kNormalFunction); |