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

Unified Diff: test/mjsunit/es6/regress/regress-4522.js

Issue 1411093008: Properly handle direct evals referencing super in arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months 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
« no previous file with comments | « src/scopes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/regress/regress-4522.js
diff --git a/test/mjsunit/es6/regress/regress-455141.js b/test/mjsunit/es6/regress/regress-4522.js
similarity index 56%
copy from test/mjsunit/es6/regress/regress-455141.js
copy to test/mjsunit/es6/regress/regress-4522.js
index 676adebe72b5532496112099d7cd41ccca395070..b71797c943676f48ca7bc40a0b68223c6de9a9d2 100644
--- a/test/mjsunit/es6/regress/regress-455141.js
+++ b/test/mjsunit/es6/regress/regress-4522.js
@@ -1,15 +1,19 @@
// 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: --no-lazy
+
"use strict";
-class Base {
-}
-class Subclass extends Base {
- constructor() {
- this.prp1 = 3;
+
+class C {
+ foo() {
+ return 42;
}
}
-function __f_1(){
+
+class D extends C {
+ foo() {
+ return (() => eval("super.foo()"))();
+ }
}
+
+assertEquals(42, new D().foo());
« no previous file with comments | « src/scopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698