From ea643db26fc6559ac7b2ca9982ecf26434b5b796 Mon Sep 17 00:00:00 2001
From: Valerie R Young <valerie@bocoup.com>
Date: Fri, 20 Oct 2017 20:03:09 -0400
Subject: [PATCH] classfields: add tests for forbidden propertynames

# Conflicts:
#	src/class-fields/propname-constructor.case
#	src/class-fields/propname-error/cls-decl-computed-name.template
#	src/class-fields/propname-error/cls-decl-literal-name.template
#	src/class-fields/propname-error/cls-decl-string-name.template
#	src/class-fields/propname-error/cls-expr-computed-name.template
#	src/class-fields/propname-error/cls-expr-literal-name.template
#	src/class-fields/propname-error/cls-expr-string-name.template
---
 .../static-propname-constructor.case          | 20 +++++++++++++++++++
 .../static-propname-prototype.case            | 20 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 src/class-fields/static-propname-constructor.case
 create mode 100644 src/class-fields/static-propname-prototype.case

diff --git a/src/class-fields/static-propname-constructor.case b/src/class-fields/static-propname-constructor.case
new file mode 100644
index 0000000000..ffa6754e20
--- /dev/null
+++ b/src/class-fields/static-propname-constructor.case
@@ -0,0 +1,20 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Static class field cannot have PropName 'constructor'
+info: |
+
+  // This test file tests the following early error:
+  Static Semantics: Early Errors
+
+    ClassElement : staticFieldDefinition;
+      It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor".
+features: [class-fields]
+template: propname-error
+---*/
+
+//- static
+static
+//- propname
+constructor
diff --git a/src/class-fields/static-propname-prototype.case b/src/class-fields/static-propname-prototype.case
new file mode 100644
index 0000000000..9b2e9ab331
--- /dev/null
+++ b/src/class-fields/static-propname-prototype.case
@@ -0,0 +1,20 @@
+// Copyright (C) 2017 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+desc: Static class fields cannot have PropName 'prototype'
+info: |
+
+  // This test file tests the following early error:
+  Static Semantics: Early Errors
+
+    ClassElement : staticFieldDefinition;
+      It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor".
+features: [class-fields]
+template: propname-error
+---*/
+
+//- static
+static
+//- propname
+prototype
-- 
GitLab