diff options
Diffstat (limited to 'src/class-fields/delete-error/cls-expr-method-delete.template')
-rw-r--r-- | src/class-fields/delete-error/cls-expr-method-delete.template | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/class-fields/delete-error/cls-expr-method-delete.template b/src/class-fields/delete-error/cls-expr-method-delete.template new file mode 100644 index 000000000..c80c0faa0 --- /dev/null +++ b/src/class-fields/delete-error/cls-expr-method-delete.template @@ -0,0 +1,31 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/expressions/class/err-method-delete- +name: in method +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + It is a Syntax Error if the UnaryExpression is contained in strict mode code and the derived UnaryExpression is PrimaryExpression : IdentifierReference , MemberExpression : MemberExpression.PrivateName , or CallExpression : CallExpression.PrivateName . +features: [class-fields] +negative: + type: SyntaxError + phase: early +---*/ + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + x() { + /*{ infunctionsetup }*/ + delete /*{ expression }*/; + } + + /*{ functiondeclaration }*/ +} |