BUG=v8:3885
LOG=N
R=adamk@chromium.org, dslomov@chromium.org
Review URL: https://codereview.chromium.org/
916293004
Cr-Commit-Position: refs/heads/master@{#26632}
template <class Traits>
typename ParserBase<Traits>::ExpressionT
ParserBase<Traits>::ParseSuperExpression(bool is_new, bool* ok) {
- int beg_pos = position();
Expect(Token::SUPER, CHECK_OK);
FunctionState* function_state = function_state_;
}
}
- ReportMessageAt(Scanner::Location(beg_pos, position()), "unexpected_super");
+ ReportMessageAt(scanner()->location(), "unexpected_super");
*ok = false;
return this->EmptyExpression();
}
--- /dev/null
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --harmony-classes
+'use strict';
+
+function f() {
+ super.x();
+}
--- /dev/null
+# Copyright 2014 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+*%(basename)s:9: SyntaxError: 'super' keyword unexpected here
+ super.x();
+ ^^^^^
+SyntaxError: 'super' keyword unexpected here