Add unit test to show that we do not parse static property assignments in a
class.
@@ -4086,6 +4086,13 @@ public final class ParserTest extends BaseJSTypeTestCase {
parseError("class Foo { get [a](b) {} };", "')' expected");
}
+ @Test
+ public void testInvalid_classSyntax_staticPropAssignmentInClass() {
+ expectFeatures();
+ strictMode = SLOPPY;
+ parseError("class Foo { static someStaticProp = 'someVal' };", "'(' expected");
+ }
+
@Test
public void testSetter_ObjectLiteral_Es3() {
expectFeatures(Feature.SETTER);
