| Index: src/ast.h
|
| diff --git a/src/ast.h b/src/ast.h
|
| index 181d798f280095dfc0543a197c8b4c655fb837fc..1e3d02594c5912d2938c786fe71872bf0e5be7d1 100644
|
| --- a/src/ast.h
|
| +++ b/src/ast.h
|
| @@ -948,6 +948,8 @@ class CatchExtensionObject: public Expression {
|
|
|
| class VariableProxy: public Expression {
|
| public:
|
| + explicit VariableProxy(Variable* var);
|
| +
|
| virtual void Accept(AstVisitor* v);
|
|
|
| // Type testing & conversion
|
| @@ -960,7 +962,10 @@ class VariableProxy: public Expression {
|
| }
|
|
|
| Variable* AsVariable() {
|
| - return this == NULL || var_ == NULL ? NULL : var_->AsVariable();
|
| + if (this == NULL || var_ == NULL) return NULL;
|
| + Expression* rewrite = var_->rewrite();
|
| + if (rewrite == NULL || rewrite->AsSlot() != NULL) return var_;
|
| + return NULL;
|
| }
|
|
|
| virtual bool IsValidLeftHandSide() {
|
|
|