blob: 6aa48642357420cb9cf0fbd694499708043c2f3c [file] [log] [blame] [edit]
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-performeval-rules-in-initializer
path: language/expressions/class/elements/private-indirect-
name: indirect eval
features: [class, class-fields-private]
flags: [noStrict]
---*/
var /*{ initializer }*/ = 1;
var C = class {
#x = (0, eval)('/*{ initializer }*/;');
x() {
return this.#x;
}
}
assert.sameValue(new C().x(), /*{ initializer }*/);