| Index: src/ast/scopes.h
|
| diff --git a/src/ast/scopes.h b/src/ast/scopes.h
|
| index 561a7fce06f8fcf32715040f605681bfd47d3f4b..8a84664c18ec44d657ebc85db9208c98d3b66c5f 100644
|
| --- a/src/ast/scopes.h
|
| +++ b/src/ast/scopes.h
|
| @@ -124,8 +124,12 @@
|
|
|
| // Lookup a variable in this scope. Returns the variable or NULL if not found.
|
| Variable* LookupLocal(const AstRawString* name) {
|
| - return variables_.Lookup(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.
|
|
|