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