Index: test/mjsunit/harmony/super.js |
diff --git a/test/mjsunit/harmony/super.js b/test/mjsunit/harmony/super.js |
index ab572b056f262e39dcf522d090cc9667c19309dd..576786f94ef880e1c6a7b5a48fa5a89d261b4cc8 100644 |
--- a/test/mjsunit/harmony/super.js |
+++ b/test/mjsunit/harmony/super.js |
@@ -3,7 +3,7 @@ |
// found in the LICENSE file. |
// Flags: --harmony-arrow-functions --allow-natives-syntax |
-// Flags: --harmony-spreadcalls |
+// Flags: --harmony-spreadcalls --harmony-destructuring --harmony-rest-parameters |
(function TestSuperNamedLoads() { |
function Base() { } |
@@ -2122,6 +2122,21 @@ TestKeyedSetterCreatingOwnPropertiesNonConfigurable(42, 43, 44); |
})(); |
+(function TestSuperInOtherScopes() { |
+ var p = {x: 99}; |
+ var o0 = {__proto__: p, f() { return eval("'use strict'; super.x") }}; |
+ assertEquals(p.x, o0.f()); |
+ var o1 = {__proto__: p, f() { with ({}) return super.x }}; |
+ assertEquals(p.x, o1.f()); |
+ var o2 = {__proto__: p, f({a}) { return super.x }}; |
+ assertEquals(p.x, o2.f({})); |
+ var o3 = {__proto__: p, f(...a) { return super.x }}; |
+ assertEquals(p.x, o3.f()); |
+ var o4 = {__proto__: p, f() { 'use strict'; { let x; return super.x } }}; |
+ assertEquals(p.x, o4.f()); |
+})(); |
+ |
+ |
(function TestSuperCallInEval() { |
'use strict'; |
class Base { |