blob: 72d76c00a688d741eab6b40d84d7fe8fcad9a3c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright (C) 2016 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-runtime-semantics-classdefinitionevaluation
description: >
Default class constructor does not use argument evaluation.
features: [Symbol.iterator]
---*/
Array.prototype[Symbol.iterator] = function() {
throw new Test262Error('@@iterator invoked');
};
class Base {
constructor(value) {
this.value = value;
}
}
class Derived extends Base {}
const instance = new Derived(5);
assert.sameValue(instance.value, 5);
reportCompare(0, 0);
|