Index: src/ast/scopes.h |
diff --git a/src/ast/scopes.h b/src/ast/scopes.h |
index 9135c65422b29da459c0b64a55d0cb8e9dc45171..b3c61ada24681fe1119be47272c62b5111244e7e 100644 |
--- a/src/ast/scopes.h |
+++ b/src/ast/scopes.h |
@@ -120,7 +120,13 @@ class Scope: public ZoneObject { |
// Declarations |
// Lookup a variable in this scope. Returns the variable or NULL if not found. |
- Variable* LookupLocal(const AstRawString* name); |
+ Variable* LookupLocal(const AstRawString* name) { |
+ Variable* result = variables_.Lookup(name); |
+ if (result != nullptr || scope_info_.is_null()) return result; |
+ return LookupInScopeInfo(name); |
+ } |
+ |
+ Variable* LookupInScopeInfo(const AstRawString* name); |
// Lookup a variable in this scope or outer scopes. |
// Returns the variable or NULL if not found. |