2015-03-30 18:48:02 +02:00
|
|
|
// Copyright (C) 2014 the V8 project authors. All rights reserved.
|
2015-03-04 17:09:04 +01:00
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
2018-05-24 21:10:13 +02:00
|
|
|
esid: sec-makesuperpropertyreference
|
2015-03-04 17:09:04 +01:00
|
|
|
description: >
|
|
|
|
class super in constructor
|
|
|
|
---*/
|
|
|
|
var calls = 0;
|
|
|
|
class B {}
|
|
|
|
B.prototype.x = 42;
|
|
|
|
|
|
|
|
class C extends B {
|
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
calls++;
|
|
|
|
assert.sameValue(super.x, 42, "The value of `super.x` is `42`");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
new C;
|
2018-05-24 21:10:13 +02:00
|
|
|
assert.sameValue(calls, 1, "The value of `calls` is `1`");
|