Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1023)

Unified Diff: test/message/super-constructor.js

Issue 776563002: Better message location for 'super(...)' restriction error. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: One more Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/message/super-constructor.js
diff --git a/test/mjsunit/regress/regress-416416.js b/test/message/super-constructor.js
similarity index 63%
copy from test/mjsunit/regress/regress-416416.js
copy to test/message/super-constructor.js
index 66e882e0fc348da422406c5ecf35ef454428455a..9c96d9bc34ada080b5a90e78fa9b8f967da5ca66 100644
--- a/test/mjsunit/regress/regress-416416.js
+++ b/test/message/super-constructor.js
@@ -1,14 +1,14 @@
// 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.
+//
+// Flags: --harmony-classes
+'use strict';
-function foo() {
- try {
- String.prototype.length.x();
- } catch (e) {
+class C {
+ constructor() {
+ super(this.x);
}
}
-foo();
-foo();
-foo();
+new C();
« no previous file with comments | « src/compiler.cc ('k') | test/message/super-constructor.out » ('j') | test/message/testcfg.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698