summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-prototype.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-prototype.js')
-rw-r--r--js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-prototype.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-prototype.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-prototype.js
new file mode 100644
index 0000000000..dc9adf1f87
--- /dev/null
+++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/grammar-static-async-meth-prototype.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/class-elements/grammar-static-async-meth-prototype.case
+// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
+/*---
+description: Static Async Methods cannot be named prototype (class declaration)
+esid: prod-ClassElement
+features: [async-functions, class]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ Class Definitions / Static Semantics: Early Errors
+
+ ClassElement : static MethodDefinition
+ It is a Syntax Error if PropName of MethodDefinition is "prototype"
+
+---*/
+
+
+$DONOTEVALUATE();
+
+class C {
+ static async prototype() {}
+}