mirror of
https://github.com/tc39/test262.git
synced 2025-09-26 19:48:43 +02:00
22 lines
496 B
Plaintext
22 lines
496 B
Plaintext
// 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/fields-derived-cls-indirect-
|
|
name: indirect eval
|
|
---*/
|
|
|
|
var A = class {}
|
|
|
|
var executed = false;
|
|
var C = class extends A {
|
|
x = (0, eval)('executed = true; /*{ initializer }*/;');
|
|
}
|
|
|
|
assert.throws(/*{ executionerror }*/, function() {
|
|
new C();
|
|
});
|
|
|
|
assert.sameValue(executed, true);
|