diff options
Diffstat (limited to 'deps/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-err-contains-arguments.js')
-rw-r--r-- | deps/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-err-contains-arguments.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/deps/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-err-contains-arguments.js b/deps/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-err-contains-arguments.js new file mode 100644 index 0000000000..a260f59de7 --- /dev/null +++ b/deps/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-err-contains-arguments.js @@ -0,0 +1,26 @@ +/*--- +description: Syntax error if `arguments` used in class field (arrow function expression) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-public, arrow-function] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + FieldDefinition: + PropertyNameInitializeropt + - It is a Syntax Error if ContainsArguments of Initializer is true. + Static Semantics: ContainsArguments + IdentifierReference : Identifier + 1. If the StringValue of Identifier is "arguments", return true. + ... + For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. +---*/ +throw "Test262: This statement should not be evaluated."; +var C = class { + x = () => { + var t = () => { arguments; }; + t(); + } +} |