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

Unified Diff: test/message/super-constructor-extra-statement.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-extra-statement.js
diff --git a/test/mjsunit/unused-context-in-with.js b/test/message/super-constructor-extra-statement.js
similarity index 62%
copy from test/mjsunit/unused-context-in-with.js
copy to test/message/super-constructor-extra-statement.js
index 2973ca2e5a52960c6e56510539b36b36d8213b9d..a26381bf07471ad77526141a21385f58c6aa622b 100644
--- a/test/mjsunit/unused-context-in-with.js
+++ b/test/message/super-constructor-extra-statement.js
@@ -1,13 +1,15 @@
// 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';
-var x = 1;
-function foo(object) {
- with(object) {
- x;
+class C {
+ constructor() {
+ var x;
+ super(x);
}
- return 100;
}
-assertEquals(100,foo("str"));
+new C();

Powered by Google App Engine
This is Rietveld 408576698