Index: src/ast/scopes.h |
diff --git a/src/ast/scopes.h b/src/ast/scopes.h |
index 1ea06bccc44bc0c9951f07412fa68ec6a4ab5d6b..d0f4cc943bf6c421c2ea74fe35768739f76c6361 100644 |
--- a/src/ast/scopes.h |
+++ b/src/ast/scopes.h |
@@ -772,8 +772,8 @@ class DeclarationScope : public Scope { |
// A function can have at most one rest parameter. Returns Variable* or NULL. |
Variable* rest_parameter(int* index) const { |
*index = rest_index_; |
- if (rest_index_ < 0) return NULL; |
- return rest_parameter_; |
+ if (rest_index_ < 0) return nullptr; |
+ return params_[rest_index_]; |
} |
bool has_rest_parameter() const { return rest_index_ >= 0; } |
@@ -890,7 +890,6 @@ class DeclarationScope : public Scope { |
// Info about the parameter list of a function. |
int arity_; |
int rest_index_; |
- Variable* rest_parameter_; |
// Compiler-allocated (user-invisible) temporaries. |
ZoneList<Variable*> temps_; |
// Parameter list in source order. |