Index: test/mjsunit/strong/classes.js |
diff --git a/test/mjsunit/strong/classes.js b/test/mjsunit/strong/classes.js |
index e33742af3fbd6373f68ac69b073e5b47a15c72d4..50fe5a18ee9ea79fee331afd02d62539733b456f 100644 |
--- a/test/mjsunit/strong/classes.js |
+++ b/test/mjsunit/strong/classes.js |
@@ -9,16 +9,18 @@ |
class C {} |
+let indirect_eval = eval; |
+ |
function assertTypeError(script) { assertThrows(script, TypeError) } |
function assertSyntaxError(script) { assertThrows(script, SyntaxError) } |
function assertReferenceError(script) { assertThrows(script, ReferenceError) } |
(function ImmutableClassBindings() { |
class D {} |
- assertTypeError(function(){ eval("C = 0") }); |
- assertTypeError(function(){ eval("D = 0") }); |
+ assertTypeError(function(){ indirect_eval("C = 0") }); |
assertEquals('function', typeof C); |
assertEquals('function', typeof D); |
+ assertTypeError("'use strong'; (function f() {class E {}; E = 0})()"); |
})(); |
function constructor(body) { |