Commit d5d15253 authored by arv's avatar arv Committed by Commit bot

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}
parent ca8eaef6
......@@ -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);
})();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment