3a18b9b71b
BUG=v8:4105, v8:3018 LOG=N R=arv@chromium.org Review URL: https://codereview.chromium.org/1132933003 Cr-Commit-Position: refs/heads/master@{#28405}
21 lines
762 B
JavaScript
21 lines
762 B
JavaScript
// Copyright 2015 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --harmony-spreadcalls --harmony-sloppy --harmony-rest-parameters
|
|
|
|
(function testCallSuperProperty() {
|
|
class BaseClass {
|
|
strict_method(...args) { "use strict"; return [this].concat(args); }
|
|
sloppy_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); }
|
|
}
|
|
|
|
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));
|
|
})();
|