Class Fields: extensive static and runtime production verification cases & templates

This commit is contained in:
Rick Waldron 2018-08-06 13:58:32 -04:00 committed by Leo Balter
parent f222b94f2a
commit c794f43af3
37 changed files with 2230 additions and 0 deletions

View File

@ -0,0 +1,68 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: FieldDefinition, ClassElementName, PropertyName = Initializer Syntax
info: |
ClassElement :
...
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PropertyName :
LiteralPropertyName
ComputedPropertyName
LiteralPropertyName :
IdentifierName
Initializer :
= AssignmentExpression
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart ::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart ::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue ::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/valid
features: [class-fields-public]
---*/
//- fields
$ = 1;
_ = 2;
\u{6F} = 3;
℘ = 4; // DO NOT CHANGE THE NAME OF THIS FIELD
ZW__NJ = 5; // DO NOT CHANGE THE NAME OF THIS FIELD
ZW__J = 6; // DO NOT CHANGE THE NAME OF THIS FIELD

View File

@ -0,0 +1,68 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: FieldDefinition, ClassElementName, PropertyName = Initializer Syntax
info: |
ClassElement :
...
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PropertyName :
LiteralPropertyName
ComputedPropertyName
LiteralPropertyName :
IdentifierName
Initializer :
= AssignmentExpression
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart ::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart ::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue ::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/valid
features: [class-fields-public]
---*/
//- fields
$ = 1;
_ = 2;
\u{6F} = 3;
\u2118 = 4;
ZW_\u200C_NJ = 5;
ZW_\u200D_J = 6;

View File

@ -0,0 +1,27 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: SyntaxError
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
template: syntax/invalid
features: [class-fields-private]
---*/
//- fields
x = []
y;

View File

@ -0,0 +1,68 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid FieldDefinition, ClassElementName, PropertyName Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PropertyName :
LiteralPropertyName
ComputedPropertyName
LiteralPropertyName :
IdentifierName
StringLiteral
NumericLiteral
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart ::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart ::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue ::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/valid
features: [class-fields-public]
---*/
//- fields
$;
_;
\u{6F};
℘; // DO NOT CHANGE THE NAME OF THIS FIELD
ZW__NJ; // DO NOT CHANGE THE NAME OF THIS FIELD
ZW__J; // DO NOT CHANGE THE NAME OF THIS FIELD

View File

@ -0,0 +1,63 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Invalid FieldDefinition, ClassElementName, PropertyName Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PropertyName :
LiteralPropertyName
ComputedPropertyName
LiteralPropertyName :
IdentifierName
StringLiteral
NumericLiteral
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart ::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart ::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue ::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/invalid
features: [class-fields-public]
---*/
//- fields
\u0000;

View File

@ -0,0 +1,63 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Invalid FieldDefinition, ClassElementName, PropertyName Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PropertyName :
LiteralPropertyName
ComputedPropertyName
LiteralPropertyName :
IdentifierName
StringLiteral
NumericLiteral
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart ::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart ::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue ::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/invalid
features: [class-fields-public]
---*/
//- fields
\u200D_ZWJ;

View File

@ -0,0 +1,63 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Invalid FieldDefinition, ClassElementName, PropertyName Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PropertyName :
LiteralPropertyName
ComputedPropertyName
LiteralPropertyName :
IdentifierName
StringLiteral
NumericLiteral
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart ::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart ::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue ::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/invalid
features: [class-fields-public]
---*/
//- fields
\u200C_ZWNJ;

View File

@ -0,0 +1,68 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid FieldDefinition, ClassElementName, PropertyName Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PropertyName :
LiteralPropertyName
ComputedPropertyName
LiteralPropertyName :
IdentifierName
StringLiteral
NumericLiteral
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart ::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart ::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue ::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/valid
features: [class-fields-public]
---*/
//- fields
$;
_;
\u{6F};
\u2118;
ZW_\u200C_NJ;
ZW_\u200D_J;

View File

@ -0,0 +1,27 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid multi-line, multi-field
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
template: syntax/valid
features: [class-fields-public]
---*/
//- fields
x
y

View File

@ -0,0 +1,26 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: SyntaxError
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
template: syntax/invalid
features: [class-fields-public]
---*/
//- fields
x y

View File

@ -0,0 +1,65 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid PrivateName = Initializer Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
Initializer :
= AssignmentExpression
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/valid
features: [class-fields-private]
---*/
//- fields
#$ = 1;
#_ = 2;
#\u{6F} = 3;
#℘ = 4; // DO NOT CHANGE THE NAME OF THIS FIELD
#ZW__NJ = 5; // DO NOT CHANGE THE NAME OF THIS FIELD
#ZW__J = 6; // DO NOT CHANGE THE NAME OF THIS FIELD

View File

@ -0,0 +1,65 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid PrivateName = Initializer Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
Initializer :
= AssignmentExpression
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/valid
features: [class-fields-private]
---*/
//- fields
#$ = 1;
#_ = 2;
#\u{6F} = 3;
#\u2118 = 4;
#ZW_\u200C_NJ = 5;
#ZW_\u200D_J = 6;

View File

@ -0,0 +1,29 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: No space allowed between sigial and IdentifierName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
template: syntax/invalid
features: [class-fields-private]
---*/
//- fields
# x

View File

@ -0,0 +1,57 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid PrivateName Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/invalid
features: [class-fields-private]
---*/
//- fields
#\u0000;

View File

@ -0,0 +1,58 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid PrivateName Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/invalid
features: [class-fields-private]
---*/
//- fields
#\u200D_ZWJ;

View File

@ -0,0 +1,58 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid PrivateName Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/invalid
features: [class-fields-private]
---*/
//- fields
#\u200C_ZWNJ;

View File

@ -0,0 +1,91 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: PrivateName Static Semantics, StringValue
esid: sec-private-names-static-semantics-stringvalue
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
1. Return the String value consisting of the sequence of code
units corresponding to PrivateName. In determining the sequence
any occurrences of \ UnicodeEscapeSequence are first replaced
with the code point represented by the UnicodeEscapeSequence
and then the code points of the entire PrivateName are converted
to code units by UTF16Encoding (10.1.1) each code point.
template: productions
features: [class-fields-private]
---*/
//- fields
#\u{6F};
#\u2118;
#ZW_\u200C_NJ;
#ZW_\u200D_J;
//- privateinspectionfunctions
o(value) {
this.#o = value;
return this.#o;
}
℘(value) {
this.#℘ = value;
return this.#℘;
}
ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
this.#ZW__NJ = value;
return this.#ZW__NJ;
}
ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
this.#ZW__J = value;
return this.#ZW__J;
}
//- assertions
assert.sameValue(c.o(1), 1);
assert.sameValue(c.℘(1), 1);
assert.sameValue(c.ZW__NJ(1), 1);
assert.sameValue(c.ZW__J(1), 1);

View File

@ -0,0 +1,62 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid PrivateName Syntax
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: syntax/valid
features: [class-fields-private]
---*/
//- fields
#$;
#_;
#\u{6F};
#\u2118;
#ZW_\u200C_NJ;
#ZW_\u200D_J;

View File

@ -0,0 +1,30 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: SyntaxError
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
template: syntax/valid
features: [class-fields-private]
---*/
//- fields
#x
m() {}

View File

@ -0,0 +1,30 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: SyntaxError
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
template: syntax/valid
features: [class-fields-private]
---*/
//- fields
#x
#y

View File

@ -0,0 +1,31 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: SyntaxError
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
template: syntax/invalid
negative:
features: [class-fields-private]
---*/
//- fields
#x #y

View File

@ -0,0 +1,66 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid FieldDefinition
info: |
ClassElement :
...
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PropertyName :
LiteralPropertyName
ComputedPropertyName
LiteralPropertyName :
IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-fields-private]
---*/
//- fields
$ = 1; _ = 1; \u{6F} = 1; \u2118 = 1; ZW_\u200C_NJ = 1; ZW_\u200D_J = 1
//- assertions
assert.sameValue(c.$, 1);
assert.sameValue(c._, 1);
assert.sameValue(c.\u{6F}, 1);
assert.sameValue(c.\u2118, 1);
assert.sameValue(c.ZW_\u200C_NJ, 1);
assert.sameValue(c.ZW_\u200D_J, 1);

View File

@ -0,0 +1,73 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid FieldDefinition
info: |
ClassElement :
...
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PropertyName :
LiteralPropertyName
ComputedPropertyName
LiteralPropertyName :
IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-fields-private]
---*/
//- fields
$; _; \u{6F}; \u2118; ZW_\u200C_NJ; ZW_\u200D_J
//- assertions
c.$ = 1;
c._ = 1;
c.\u{6F} = 1;
c.\u2118 = 1;
c.ZW_\u200C_NJ = 1;
c.ZW_\u200D_J = 1;
assert.sameValue(c.$, 1);
assert.sameValue(c._, 1);
assert.sameValue(c.\u{6F}, 1);
assert.sameValue(c.\u2118, 1);
assert.sameValue(c.ZW_\u200C_NJ, 1);
assert.sameValue(c.ZW_\u200D_J, 1);

View File

@ -0,0 +1,90 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid PrivateName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-fields-private]
---*/
//- fields
#$; #_; #\u{6F}; #℘; #ZW__NJ; #ZW__J
//- privateinspectionfunctions
$(value) {
this.#$ = value;
return this.#$;
}
_(value) {
this.#_ = value;
return this.#_;
}
\u{6F}(value) {
this.#\u{6F} = value;
return this.#\u{6F};
}
℘(value) {
this.#℘ = value;
return this.#℘;
}
ZW__NJ(value) {
this.#ZW__NJ = value;
return this.#ZW__NJ;
}
ZW__J(value) {
this.#ZW__J = value;
return this.#ZW__J;
}
//- assertions
assert.sameValue(c.$(1), 1);
assert.sameValue(c._(1), 1);
assert.sameValue(c.\u{6F}(1), 1);
assert.sameValue(c.℘(1), 1);
assert.sameValue(c.ZW__NJ(1), 1);
assert.sameValue(c.ZW__J(1), 1);

View File

@ -0,0 +1,84 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid PrivateName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-fields-private]
---*/
//- fields
#$ = 1; #_ = 1; #\u{6F} = 1; #℘ = 1; #ZW__NJ = 1; #ZW__J = 1
//- privateinspectionfunctions
$() {
return this.#$;
}
_() {
return this.#_;
}
\u{6F}() {
return this.#\u{6F};
}
℘() {
return this.#℘;
}
ZW__NJ() {
return this.#ZW__NJ;
}
ZW__J() {
return this.#ZW__J;
}
//- assertions
assert.sameValue(c.$(), 1);
assert.sameValue(c._(), 1);
assert.sameValue(c.\u{6F}(), 1);
assert.sameValue(c.℘(), 1);
assert.sameValue(c.ZW__NJ(), 1);
assert.sameValue(c.ZW__J(), 1);

View File

@ -0,0 +1,84 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid PrivateName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-fields-private]
---*/
//- fields
#$ = 1; #_ = 1; #\u{6F} = 1; #\u2118 = 1; #ZW_\u200C_NJ = 1; #ZW_\u200D_J = 1
//- privateinspectionfunctions
$() {
return this.#$;
}
_() {
return this.#_;
}
\u{6F}() {
return this.#\u{6F};
}
\u2118() {
return this.#\u2118;
}
ZW_\u200C_NJ() {
return this.#ZW_\u200C_NJ;
}
ZW_\u200D_J() {
return this.#ZW_\u200D_J;
}
//- assertions
assert.sameValue(c.$(), 1);
assert.sameValue(c._(), 1);
assert.sameValue(c.\u{6F}(), 1);
assert.sameValue(c.\u2118(), 1);
assert.sameValue(c.ZW_\u200C_NJ(), 1);
assert.sameValue(c.ZW_\u200D_J(), 1);

View File

@ -0,0 +1,90 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid PrivateName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-fields-private]
---*/
//- fields
#$; #_; #\u{6F}; #\u2118; #ZW_\u200C_NJ; #ZW_\u200D_J
//- privateinspectionfunctions
$(value) {
this.#$ = value;
return this.#$;
}
_(value) {
this.#_ = value;
return this.#_;
}
\u{6F}(value) {
this.#\u{6F} = value;
return this.#\u{6F};
}
\u2118(value) {
this.#\u2118 = value;
return this.#\u2118;
}
ZW_\u200C_NJ(value) {
this.#ZW_\u200C_NJ = value;
return this.#ZW_\u200C_NJ;
}
ZW_\u200D_J(value) {
this.#ZW_\u200D_J = value;
return this.#ZW_\u200D_J;
}
//- assertions
assert.sameValue(c.$(1), 1);
assert.sameValue(c._(1), 1);
assert.sameValue(c.\u{6F}(1), 1);
assert.sameValue(c.\u2118(1), 1);
assert.sameValue(c.ZW_\u200C_NJ(1), 1);
assert.sameValue(c.ZW_\u200D_J(1), 1);

View File

@ -0,0 +1,109 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid Static Method PrivateName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
static FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-static-fields-private]
---*/
//- fields
static #$(value) {
this.$ = value;
return value;
}
static #_(value) {
this.#stored = value;
return value;
}
static #o(value) {
this.#stored = value;
return value;
}
static #℘(value) {
this.#stored = value;
return value;
}
static #ZW__NJ(value) {
this.#stored = value;
return value;
}
static #ZW__J(value) {
this.#stored = value;
return value;
}
//- privateinspectionfunctions
static $(value) {
return this.#$(value);
}
static _(value) {
return this.#_(value);
}
static o(value) {
return this.#o(value);
}
static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
return this.#℘(value);
}
static ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
return this.#ZW__NJ(value);
}
static ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
return this.#ZW__J(value);
}
//- assertions
assert.sameValue(C.$(1), 1);
assert.sameValue(C._(1), 1);
assert.sameValue(C.o(1), 1);
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD

View File

@ -0,0 +1,103 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid Static Method PrivateName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
static FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-static-fields-private]
---*/
//- fields
static #$(value) {
return value;
}
static #_(value) {
return value;
}
static #\u{6F}(value) {
return value;
}
static #\u2118(value) {
return value;
}
static #ZW_\u200C_NJ(value) {
return value;
}
static #ZW_\u200D_J(value) {
return value;
}
//- privateinspectionfunctions
static $(value) {
return this.#$(value);
}
static _(value) {
return this.#_(value);
}
static \u{6F}(value) {
return this.#\u{6F}(value);
}
static \u2118(value) {
return this.#\u2118(value);
}
static ZW_\u200C_NJ(value) {
return this.#ZW_\u200C_NJ(value);
}
static ZW_\u200D_J(value) {
return this.#ZW_\u200D_J(value);
}
//- assertions
assert.sameValue(C.$(1), 1);
assert.sameValue(C._(1), 1);
assert.sameValue(C.\u{6F}(1), 1);
assert.sameValue(C.\u2118(1), 1);
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
assert.sameValue(C.ZW_\u200D_J(1), 1);

View File

@ -0,0 +1,91 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid Static PrivateName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
static FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-static-fields-private]
---*/
//- fields
static #$; static #_; static #\u{6F}; static #℘; static #ZW__NJ; static #ZW__J
//- privateinspectionfunctions
static $(value) {
this.#$ = value;
return this.#$;
}
static _(value) {
this.#_ = value;
return this.#_;
}
static o(value) {
this.#\u{6F} = value;
return this.#\u{6F};
}
static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
this.#℘ = value;
return this.#℘;
}
static ZW__NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
this.#ZW__NJ = value;
return this.#ZW__NJ;
}
static ZW__J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD
this.#ZW__J = value;
return this.#ZW__J;
}
//- assertions
assert.sameValue(C.$(1), 1);
assert.sameValue(C._(1), 1);
assert.sameValue(C.o(1), 1);
assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
assert.sameValue(C.ZW__NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD
assert.sameValue(C.ZW__J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD

View File

@ -0,0 +1,85 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid Static PrivateName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
static FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-static-fields-private]
---*/
//- fields
static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW__NJ = 1; static #ZW__J = 1
//- privateinspectionfunctions
static $() {
return this.#$;
}
static _() {
return this.#_;
}
static \u{6F}() {
return this.#\u{6F};
}
static ℘() {
return this.#℘;
}
static ZW__NJ() {
return this.#ZW__NJ;
}
static ZW__J() {
return this.#ZW__J;
}
//- assertions
assert.sameValue(C.$(), 1);
assert.sameValue(C._(), 1);
assert.sameValue(C.\u{6F}(), 1);
assert.sameValue(C.℘(), 1);
assert.sameValue(C.ZW__NJ(), 1);
assert.sameValue(C.ZW__J(), 1);

View File

@ -0,0 +1,85 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid Static PrivateName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
static FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-static-fields-private]
---*/
//- fields
static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #\u2118 = 1; static #ZW_\u200C_NJ = 1; static #ZW_\u200D_J = 1
//- privateinspectionfunctions
static $() {
return this.#$;
}
static _() {
return this.#_;
}
static \u{6F}() {
return this.#\u{6F};
}
static \u2118() {
return this.#\u2118;
}
static ZW_\u200C_NJ() {
return this.#ZW_\u200C_NJ;
}
static ZW_\u200D_J() {
return this.#ZW_\u200D_J;
}
//- assertions
assert.sameValue(C.$(), 1);
assert.sameValue(C._(), 1);
assert.sameValue(C.\u{6F}(), 1);
assert.sameValue(C.\u2118(), 1);
assert.sameValue(C.ZW_\u200C_NJ(), 1);
assert.sameValue(C.ZW_\u200D_J(), 1);

View File

@ -0,0 +1,91 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Valid Static PrivateName
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
static FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
IdentifierName ::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart ::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ> <ZWJ>
UnicodeIDStart::
any Unicode code point with the Unicode property "ID_Start"
UnicodeIDContinue::
any Unicode code point with the Unicode property "ID_Continue"
NOTE 3
The sets of code points with Unicode properties "ID_Start" and
"ID_Continue" include, respectively, the code points with Unicode
properties "Other_ID_Start" and "Other_ID_Continue".
template: productions
features: [class-static-fields-private]
---*/
//- fields
static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J
//- privateinspectionfunctions
static $(value) {
this.#$ = value;
return this.#$;
}
static _(value) {
this.#_ = value;
return this.#_;
}
static \u{6F}(value) {
this.#\u{6F} = value;
return this.#\u{6F};
}
static \u2118(value) {
this.#\u2118 = value;
return this.#\u2118;
}
static ZW_\u200C_NJ(value) {
this.#ZW_\u200C_NJ = value;
return this.#ZW_\u200C_NJ;
}
static ZW_\u200D_J(value) {
this.#ZW_\u200D_J = value;
return this.#ZW_\u200D_J;
}
//- assertions
assert.sameValue(C.$(1), 1);
assert.sameValue(C._(1), 1);
assert.sameValue(C.\u{6F}(1), 1);
assert.sameValue(C.\u2118(1), 1);
assert.sameValue(C.ZW_\u200C_NJ(1), 1);
assert.sameValue(C.ZW_\u200D_J(1), 1);

View File

@ -0,0 +1,18 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-ClassElement
name: class declaration
path: language/statements/class/syntax-invalid-
features: [class]
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
class C {
/*{ fields }*/
}

View File

@ -0,0 +1,18 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-ClassElement
name: class expression
path: language/expressions/class/syntax-invalid-
features: [class]
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
/*{ fields }*/
};

View File

@ -0,0 +1,13 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-ClassElement
name: class declaration
path: language/statements/class/syntax-valid-
features: [class]
---*/
class C {
/*{ fields }*/
}

View File

@ -0,0 +1,13 @@
// Copyright (C) 2018 Rick Waldron. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-ClassElement
name: class expression
path: language/expressions/class/syntax-valid-
features: [class]
---*/
var C = class {
/*{ fields }*/
};