Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: test/mjsunit/harmony/spread-call-super-property.js

Issue 1300103005: [parser] disallow language mode directive in body of function with non-simple parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: flag implications don't work in test suite? Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/harmony/rest-params.js ('k') | test/mjsunit/strong/destructuring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/spread-call-super-property.js
diff --git a/test/mjsunit/harmony/spread-call-super-property.js b/test/mjsunit/harmony/spread-call-super-property.js
index cdf6f2e242268ab6df3bf5a9c378cfc7fe67e4bf..1eb2abc3b0433a99051b39f8b76775fbfea81b2a 100644
--- a/test/mjsunit/harmony/spread-call-super-property.js
+++ b/test/mjsunit/harmony/spread-call-super-property.js
@@ -4,17 +4,28 @@
// Flags: --harmony-spreadcalls --harmony-sloppy --harmony-rest-parameters
-(function testCallSuperProperty() {
+(function testCallSuperPropertyStrict() {
+ "use strict";
class BaseClass {
- strict_method(...args) { "use strict"; return [this].concat(args); }
- sloppy_method(...args) { return [this].concat(args); }
+ method(...args) { return [this].concat(args); }
}
class SubClass extends BaseClass {
- strict_m(...args) { return super.strict_method(...args); }
- sloppy_m(...args) { return super.sloppy_method(...args); }
+ method(...args) { return super.method(...args); }
}
var c = new SubClass();
- assertEquals([c, 1, 2, 3, 4, 5], c.strict_m(1, 2, 3, 4, 5));
- assertEquals([c, 1, 2, 3, 4, 5], c.sloppy_m(1, 2, 3, 4, 5));
+ assertEquals([c, 1, 2, 3, 4, 5], c.method(1, 2, 3, 4, 5));
+})();
+
+
+(function testCallSuperPropertySloppy() {
+ class BaseClass {
+ method(...args) { return [this].concat(args); }
+ }
+ class SubClass extends BaseClass {
+ method(...args) { return super.method(...args); }
+ }
+
+ var c = new SubClass();
+ assertEquals([c, 1, 2, 3, 4, 5], c.method(1, 2, 3, 4, 5));
})();
« no previous file with comments | « test/mjsunit/harmony/rest-params.js ('k') | test/mjsunit/strong/destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698