Index: src/scopes.h |
diff --git a/src/scopes.h b/src/scopes.h |
index 3054f30e2b86d343feb48845915c98220c019d15..723509a78e0048ba422082c3dfc579cc0b8ff15b 100644 |
--- a/src/scopes.h |
+++ b/src/scopes.h |
@@ -302,15 +302,15 @@ class Scope: public ZoneObject { |
// Specific scope types. |
bool is_eval_scope() const { return scope_type_ == EVAL_SCOPE; } |
- bool is_function_scope() const { |
- return scope_type_ == FUNCTION_SCOPE || scope_type_ == ARROW_SCOPE; |
- } |
+ bool is_function_scope() const { return scope_type_ == FUNCTION_SCOPE; } |
bool is_module_scope() const { return scope_type_ == MODULE_SCOPE; } |
bool is_script_scope() const { return scope_type_ == SCRIPT_SCOPE; } |
bool is_catch_scope() const { return scope_type_ == CATCH_SCOPE; } |
bool is_block_scope() const { return scope_type_ == BLOCK_SCOPE; } |
bool is_with_scope() const { return scope_type_ == WITH_SCOPE; } |
- bool is_arrow_scope() const { return scope_type_ == ARROW_SCOPE; } |
+ bool is_arrow_scope() const { |
+ return is_function_scope() && IsArrowFunction(function_kind_); |
+ } |
bool is_declaration_scope() const { return is_declaration_scope_; } |
void set_is_declaration_scope() { is_declaration_scope_ = true; } |