mirror of
https://github.com/tc39/test262.git
synced 2025-11-24 23:53:14 +01:00
24 lines
534 B
Plaintext
24 lines
534 B
Plaintext
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-performeval-rules-in-initializer
|
|
path: language/statements/class/elements/arrow-body-private-direct-
|
|
name: direct eval
|
|
features: [class, class-fields-private]
|
|
---*/
|
|
|
|
var executed = false;
|
|
class C {
|
|
#x = eval('executed = true; /*{ arrow-body }*/;');
|
|
constructor() {
|
|
this.#x();
|
|
}
|
|
}
|
|
|
|
assert.throws(/*{ earlyerror }*/, function() {
|
|
new C();
|
|
});
|
|
|
|
assert.sameValue(executed, false);
|