test262/test/language/statements/class/elements/private-derived-cls-direct-...

32 lines
957 B
JavaScript
Raw Normal View History

2018-08-20 23:12:33 +02:00
// This file was procedurally generated from the following sources:
2019-05-23 00:24:09 +02:00
// - src/class-elements/eval-contains-superproperty-2.case
2018-09-05 22:12:46 +02:00
// - src/class-elements/initializer-eval-super-property/cls-decl-private-fields-eval.template
2018-08-20 23:12:33 +02:00
/*---
2019-05-23 00:24:09 +02:00
description: super['x'] in StatementList of eval (direct eval)
2018-08-20 23:12:33 +02:00
esid: sec-performeval-rules-in-initializer
2018-08-31 21:22:43 +02:00
features: [class, class-fields-public, class-fields-private]
2018-08-20 23:12:33 +02:00
flags: [generated]
info: |
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperProperty.
---*/
var executed = false;
class A {}
class C extends A {
#x = eval('executed = true; super["x"];');
}
new C();
assert.sameValue(executed, true);