mirror of https://github.com/tc39/test262.git
fix built-ins/Object/subclass-object-arg (#2200)
This commit is contained in:
parent
aa04a11698
commit
ceaebf7058
|
@ -11,7 +11,6 @@ info: |
|
||||||
1. If NewTarget is neither undefined nor the active function, then
|
1. If NewTarget is neither undefined nor the active function, then
|
||||||
a. Return ? OrdinaryCreateFromConstructor(NewTarget, "%ObjectPrototype%").
|
a. Return ? OrdinaryCreateFromConstructor(NewTarget, "%ObjectPrototype%").
|
||||||
[...]
|
[...]
|
||||||
3. Return ! ToObject(value).
|
|
||||||
features: [class, Reflect, Reflect.construct]
|
features: [class, Reflect, Reflect.construct]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -20,5 +19,8 @@ class O extends Object {}
|
||||||
var o1 = new O({a: 1});
|
var o1 = new O({a: 1});
|
||||||
var o2 = Reflect.construct(Object, [{b: 2}], O);
|
var o2 = Reflect.construct(Object, [{b: 2}], O);
|
||||||
|
|
||||||
assert.sameValue(o1.a, 1);
|
assert.sameValue(o1.a, undefined);
|
||||||
assert.sameValue(o2.b, 2);
|
assert.sameValue(o2.b, undefined);
|
||||||
|
|
||||||
|
assert.sameValue(Object.getPrototypeOf(o1), O.prototype);
|
||||||
|
assert.sameValue(Object.getPrototypeOf(o2), O.prototype);
|
||||||
|
|
Loading…
Reference in New Issue