fix built-ins/Object/subclass-object-arg (#2200)

This commit is contained in:
Gus Caplan 2019-06-19 14:48:53 -05:00 committed by Leo Balter
parent aa04a11698
commit ceaebf7058
1 changed files with 5 additions and 3 deletions

View File

@ -11,7 +11,6 @@ info: |
1. If NewTarget is neither undefined nor the active function, then
a. Return ? OrdinaryCreateFromConstructor(NewTarget, "%ObjectPrototype%").
[...]
3. Return ! ToObject(value).
features: [class, Reflect, Reflect.construct]
---*/
@ -20,5 +19,8 @@ class O extends Object {}
var o1 = new O({a: 1});
var o2 = Reflect.construct(Object, [{b: 2}], O);
assert.sameValue(o1.a, 1);
assert.sameValue(o2.b, 2);
assert.sameValue(o1.a, undefined);
assert.sameValue(o2.b, undefined);
assert.sameValue(Object.getPrototypeOf(o1), O.prototype);
assert.sameValue(Object.getPrototypeOf(o2), O.prototype);