mirror of https://github.com/tc39/test262.git
Rename bound function test and update meta
This commit is contained in:
parent
47abdd0c5e
commit
9bd8813674
|
@ -1,29 +0,0 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||
es6id: 14.5.14
|
||||
description: SuperClass may be a bound function object
|
||||
info: |
|
||||
[...]
|
||||
5. If ClassHeritageopt is not present, then
|
||||
[...]
|
||||
6. Else,
|
||||
[...]
|
||||
e. If superclass is null, then
|
||||
[...]
|
||||
f. Else if IsConstructor(superclass) is false, throw a TypeError exception.
|
||||
g. Else,
|
||||
i. Let protoParent be ? Get(superclass, "prototype").
|
||||
ii. If Type(protoParent) is neither Object nor Null, throw a TypeError
|
||||
exception.
|
||||
iii. Let constructorParent be superclass.
|
||||
[...]
|
||||
---*/
|
||||
|
||||
var bound = function() {}.bind();
|
||||
bound.prototype = {};
|
||||
|
||||
class C extends bound {}
|
||||
|
||||
assert.sameValue(Object.getPrototypeOf(new C()), C.prototype);
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||
description: SuperClass may be a bound function object
|
||||
info: |
|
||||
ClassDefinitionEvaluation
|
||||
|
||||
[...]
|
||||
5. Else,
|
||||
[...]
|
||||
f. Else if IsConstructor(superclass) is false, throw a TypeError exception.
|
||||
g. Else,
|
||||
i. Let protoParent be ? Get(superclass, "prototype").
|
||||
ii. If Type(protoParent) is neither Object nor Null, throw a TypeError exception.
|
||||
iii. Let constructorParent be superclass.
|
||||
features: [class]
|
||||
---*/
|
||||
|
||||
var bound = function() {}.bind();
|
||||
bound.prototype = {};
|
||||
|
||||
class C extends bound {}
|
||||
|
||||
assert.sameValue(Object.getPrototypeOf(new C()), C.prototype);
|
Loading…
Reference in New Issue