Classes: Expand test to cover strict runtime behavior

This tests that the extends expression is treated as strict at
runtime and not just at parse time.

BUG=v8:3330
LOG=Y
R=dslomov@chromium.org

Review URL: https://codereview.chromium.org/729323003

Cr-Commit-Position: refs/heads/master@{#25407}
This commit is contained in:
arv 2014-11-18 11:00:08 -08:00 committed by Commit bot
parent ca8eaef638
commit d5d15253b8

View File

@ -159,6 +159,15 @@
assertThrows('class C extends function B() { with ({}); return B; }() {}',
SyntaxError);
var D = class extends function() {
arguments.caller;
} {};
assertThrows(function() {
Object.getPrototypeOf(D).arguments;
}, TypeError);
assertThrows(function() {
new D;
}, TypeError);
})();