blob: 4ab22539261b7a26e70a3429135264e4d24841a9 (
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
28
29
|
// Copyright (C) 2017 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: The constructor method is called after the fields are initalized
info: |
[[Construct]] ( argumentsList, newTarget)
8. If kind is "base", then
a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
b. Let result be InitializeInstanceFields(thisArgument, F).
...
...
11. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
...
template: default
---*/
//- setup
var ctor;
//- fields
constructor() {
ctor = this.foo;
}
foo = 42;
//- assertions
var c = new C();
assert.sameValue(ctor, 42);
|