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:
parent
ca8eaef638
commit
d5d15253b8
@ -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);
|
||||
})();
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user