blob: 361a4e9202223016050c2884f80d6520a602feca [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/statements/class/elements/private-indirect-
name: indirect eval
features: [class, class-fields-private]
---*/
var executed = false;
class C {
#x = (0, eval)('executed = true; /*{ initializer }*/;');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);