From 331a3964d5d618a5f36e3adc4882553dd7573feb Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 10 Aug 2018 11:52:50 -0400 Subject: [PATCH] Generate tests --- ...tename-identifier-semantics-stringvalue.js | 10 +- ...ine-gen-rs-field-identifier-initializer.js | 8 +- ...after-same-line-gen-rs-field-identifier.js | 8 +- ...-line-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...same-line-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...ne-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...er-same-line-method-rs-field-identifier.js | 8 +- ...ne-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...e-line-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...ync-gen-rs-field-identifier-initializer.js | 8 +- ...ne-static-async-gen-rs-field-identifier.js | 8 +- ...async-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...tic-async-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 135 ++++++++++++++ ...generator-method-privatename-identifier.js | 136 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 135 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 136 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 124 +++++++++++++ ...generator-method-privatename-identifier.js | 125 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 110 ++++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 110 ++++++++++++ ...identifier-initializer-alt-by-classname.js | 104 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...nc-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...static-async-method-rs-field-identifier.js | 8 +- ...nc-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...-async-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 134 ++++++++++++++ ...generator-method-privatename-identifier.js | 135 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 134 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 135 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 123 +++++++++++++ ...generator-method-privatename-identifier.js | 124 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 109 ++++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 109 ++++++++++++ ...identifier-initializer-alt-by-classname.js | 103 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...tic-gen-rs-field-identifier-initializer.js | 8 +- ...ame-line-static-gen-rs-field-identifier.js | 8 +- ...tatic-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...ne-static-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...ic-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...-line-static-method-rs-field-identifier.js | 8 +- ...ic-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...static-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...elds-computed-name-propname-constructor.js | 32 ---- ...mputed-name-static-propname-constructor.js | 31 ---- ...ls-direct-eval-err-contains-supercall-1.js | 2 +- ...ls-direct-eval-err-contains-supercall-2.js | 2 +- ...-cls-direct-eval-err-contains-supercall.js | 2 +- ...irect-eval-err-contains-superproperty-1.js | 2 +- ...-indirect-eval-err-contains-supercall-1.js | 2 +- ...-indirect-eval-err-contains-supercall-2.js | 2 +- ...ls-indirect-eval-err-contains-supercall.js | 2 +- ...irect-eval-err-contains-superproperty-1.js | 2 +- ...elds-direct-eval-err-contains-newtarget.js | 2 +- ...ds-indirect-eval-err-contains-newtarget.js | 2 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...nitions-rs-field-identifier-initializer.js | 8 +- ...ultiple-definitions-rs-field-identifier.js | 8 +- ...finitions-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...s-rs-privatename-identifier-initializer.js | 10 +- ...e-definitions-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 167 +++++++++++++++++ ...generator-method-privatename-identifier.js | 168 ++++++++++++++++++ ...async-method-privatename-identifier-alt.js | 167 +++++++++++++++++ ...tic-async-method-privatename-identifier.js | 168 ++++++++++++++++++ ...rator-method-privatename-identifier-alt.js | 156 ++++++++++++++++ ...generator-method-privatename-identifier.js | 157 ++++++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 142 +++++++++++++++ ...ns-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 142 +++++++++++++++ ...identifier-initializer-alt-by-classname.js | 136 ++++++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...itions-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...nitions-rs-field-identifier-initializer.js | 8 +- ...stacked-definitions-rs-field-identifier.js | 8 +- ...finitions-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...s-rs-privatename-identifier-initializer.js | 10 +- ...d-definitions-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 145 +++++++++++++++ ...generator-method-privatename-identifier.js | 146 +++++++++++++++ ...async-method-privatename-identifier-alt.js | 145 +++++++++++++++ ...tic-async-method-privatename-identifier.js | 146 +++++++++++++++ ...rator-method-privatename-identifier-alt.js | 134 ++++++++++++++ ...generator-method-privatename-identifier.js | 135 ++++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 120 +++++++++++++ ...ns-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 120 +++++++++++++ ...identifier-initializer-alt-by-classname.js | 114 ++++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...itions-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...w-no-sc-line-method-rs-field-identifier.js | 8 +- ...ne-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...c-line-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...generator-method-privatename-identifier.js | 133 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 133 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 121 +++++++++++++ ...generator-method-privatename-identifier.js | 122 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 107 +++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 107 +++++++++++ ...identifier-initializer-alt-by-classname.js | 101 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...ine-gen-rs-field-identifier-initializer.js | 8 +- ...lds-new-sc-line-gen-rs-field-identifier.js | 8 +- ...-line-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...w-sc-line-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...generator-method-privatename-identifier.js | 133 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 133 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 121 +++++++++++++ ...generator-method-privatename-identifier.js | 122 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 107 +++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 107 +++++++++++ ...identifier-initializer-alt-by-classname.js | 101 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...ne-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...-new-sc-line-method-rs-field-identifier.js | 8 +- ...ne-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...c-line-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...generator-method-privatename-identifier.js | 133 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 133 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 121 +++++++++++++ ...generator-method-privatename-identifier.js | 122 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 107 +++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 107 +++++++++++ ...identifier-initializer-alt-by-classname.js | 101 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...vate-direct-eval-err-contains-newtarget.js | 2 +- ...te-indirect-eval-err-contains-newtarget.js | 2 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...nitions-rs-field-identifier-initializer.js | 8 +- ...regular-definitions-rs-field-identifier.js | 8 +- ...finitions-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...s-rs-privatename-identifier-initializer.js | 10 +- ...r-definitions-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...async-method-privatename-identifier-alt.js | 120 +++++++++++++ ...tic-async-method-privatename-identifier.js | 121 +++++++++++++ ...rator-method-privatename-identifier-alt.js | 109 ++++++++++++ ...generator-method-privatename-identifier.js | 110 ++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 95 ++++++++++ ...ns-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 95 ++++++++++ ...identifier-initializer-alt-by-classname.js | 89 ++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...itions-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...ync-gen-rs-field-identifier-initializer.js | 8 +- ...same-line-async-gen-rs-field-identifier.js | 8 +- ...async-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...ine-async-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 135 ++++++++++++++ ...generator-method-privatename-identifier.js | 136 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 135 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 136 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 124 +++++++++++++ ...generator-method-privatename-identifier.js | 125 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 110 ++++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 110 ++++++++++++ ...identifier-initializer-alt-by-classname.js | 104 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...nc-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...e-line-async-method-rs-field-identifier.js | 8 +- ...nc-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...-async-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 134 ++++++++++++++ ...generator-method-privatename-identifier.js | 135 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 134 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 135 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 123 +++++++++++++ ...generator-method-privatename-identifier.js | 124 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 109 ++++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 109 ++++++++++++ ...identifier-initializer-alt-by-classname.js | 103 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...ine-gen-rs-field-identifier-initializer.js | 8 +- ...ields-same-line-gen-rs-field-identifier.js | 8 +- ...-line-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...same-line-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...ne-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...ds-same-line-method-rs-field-identifier.js | 8 +- ...ne-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...e-line-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...d-in-sc-rs-field-identifier-initializer.js | 8 +- ...ields-wrapped-in-sc-rs-field-identifier.js | 8 +- ...ped-in-sc-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...c-rs-privatename-identifier-initializer.js | 10 +- ...wrapped-in-sc-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 122 +++++++++++++ ...generator-method-privatename-identifier.js | 123 +++++++++++++ ...async-method-privatename-identifier-alt.js | 122 +++++++++++++ ...tic-async-method-privatename-identifier.js | 123 +++++++++++++ ...rator-method-privatename-identifier-alt.js | 111 ++++++++++++ ...generator-method-privatename-identifier.js | 112 ++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 97 ++++++++++ ...sc-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 97 ++++++++++ ...identifier-initializer-alt-by-classname.js | 91 ++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...-in-sc-rs-static-privatename-identifier.js | 10 +- ...ate-fields-proxy-default-handler-throws.js | 4 +- ...grammar-field-def-has-initializer-no-sc.js | 31 ---- ...rammar-field-no-initializer-with-method.js | 32 ---- .../class/syntax-error-grammar-fields.js | 31 ---- ...-privatename-no-initializer-with-method.js | 35 ---- .../class/syntax-error-grammar-privatename.js | 34 ---- .../syntax-error-grammar-privatenames.js | 34 ---- ...mmar-field-identifier-invalid-ues-error.js | 6 +- ...mmar-field-identifier-invalid-zwj-error.js | 6 +- ...mar-field-identifier-invalid-zwnj-error.js | 6 +- ...yntax-invalid-grammar-privatename-error.js | 4 +- ...mmar-privatename-identifier-invalid-ues.js | 10 +- ...rivatename-identifier-invalid-zwj-error.js | 10 +- ...ivatename-identifier-invalid-zwnj-error.js | 10 +- ...ivatename-identifier-non-id-start-error.js | 65 ------- ...ar-privatename-identifier-non-ues-error.js | 65 ------- ...id-grammar-privatenames-same-line-error.js | 2 +- ...-field-classelementname-initializer-alt.js | 4 +- ...mmar-field-classelementname-initializer.js | 4 +- ...ntax-valid-grammar-field-identifier-alt.js | 4 +- .../syntax-valid-grammar-field-identifier.js | 4 +- .../syntax-valid-grammar-fields-multi-line.js | 2 +- ...tename-classelementname-initializer-alt.js | 10 +- ...rivatename-classelementname-initializer.js | 10 +- ...ax-valid-grammar-privatename-identifier.js | 10 +- ...-privatename-no-initializer-with-method.js | 2 +- ...x-valid-grammar-privatenames-multi-line.js | 2 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...ine-gen-rs-field-identifier-initializer.js | 8 +- ...after-same-line-gen-rs-field-identifier.js | 8 +- ...-line-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...same-line-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...ne-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...er-same-line-method-rs-field-identifier.js | 8 +- ...ne-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...e-line-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...ync-gen-rs-field-identifier-initializer.js | 8 +- ...ne-static-async-gen-rs-field-identifier.js | 8 +- ...async-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...tic-async-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 135 ++++++++++++++ ...generator-method-privatename-identifier.js | 136 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 135 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 136 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 124 +++++++++++++ ...generator-method-privatename-identifier.js | 125 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 110 ++++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 110 ++++++++++++ ...identifier-initializer-alt-by-classname.js | 104 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...nc-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...static-async-method-rs-field-identifier.js | 8 +- ...nc-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...-async-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 134 ++++++++++++++ ...generator-method-privatename-identifier.js | 135 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 134 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 135 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 123 +++++++++++++ ...generator-method-privatename-identifier.js | 124 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 109 ++++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 109 ++++++++++++ ...identifier-initializer-alt-by-classname.js | 103 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...tic-gen-rs-field-identifier-initializer.js | 8 +- ...ame-line-static-gen-rs-field-identifier.js | 8 +- ...tatic-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...ne-static-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...ic-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...-line-static-method-rs-field-identifier.js | 8 +- ...ic-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...static-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...ls-direct-eval-err-contains-supercall-1.js | 2 +- ...ls-direct-eval-err-contains-supercall-2.js | 2 +- ...-cls-direct-eval-err-contains-supercall.js | 2 +- ...irect-eval-err-contains-superproperty-1.js | 2 +- ...-indirect-eval-err-contains-supercall-1.js | 2 +- ...-indirect-eval-err-contains-supercall-2.js | 2 +- ...ls-indirect-eval-err-contains-supercall.js | 2 +- ...irect-eval-err-contains-superproperty-1.js | 2 +- ...elds-direct-eval-err-contains-newtarget.js | 2 +- ...ds-indirect-eval-err-contains-newtarget.js | 2 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...nitions-rs-field-identifier-initializer.js | 8 +- ...ultiple-definitions-rs-field-identifier.js | 8 +- ...finitions-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...s-rs-privatename-identifier-initializer.js | 10 +- ...e-definitions-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 167 +++++++++++++++++ ...generator-method-privatename-identifier.js | 168 ++++++++++++++++++ ...async-method-privatename-identifier-alt.js | 167 +++++++++++++++++ ...tic-async-method-privatename-identifier.js | 168 ++++++++++++++++++ ...rator-method-privatename-identifier-alt.js | 156 ++++++++++++++++ ...generator-method-privatename-identifier.js | 157 ++++++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 142 +++++++++++++++ ...ns-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 142 +++++++++++++++ ...identifier-initializer-alt-by-classname.js | 136 ++++++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...itions-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...nitions-rs-field-identifier-initializer.js | 8 +- ...stacked-definitions-rs-field-identifier.js | 8 +- ...finitions-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...s-rs-privatename-identifier-initializer.js | 10 +- ...d-definitions-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 145 +++++++++++++++ ...generator-method-privatename-identifier.js | 146 +++++++++++++++ ...async-method-privatename-identifier-alt.js | 145 +++++++++++++++ ...tic-async-method-privatename-identifier.js | 146 +++++++++++++++ ...rator-method-privatename-identifier-alt.js | 134 ++++++++++++++ ...generator-method-privatename-identifier.js | 135 ++++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 120 +++++++++++++ ...ns-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 120 +++++++++++++ ...identifier-initializer-alt-by-classname.js | 114 ++++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...itions-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...w-no-sc-line-method-rs-field-identifier.js | 8 +- ...ne-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...c-line-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...generator-method-privatename-identifier.js | 133 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 133 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 121 +++++++++++++ ...generator-method-privatename-identifier.js | 122 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 107 +++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 107 +++++++++++ ...identifier-initializer-alt-by-classname.js | 101 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...ine-gen-rs-field-identifier-initializer.js | 8 +- ...lds-new-sc-line-gen-rs-field-identifier.js | 8 +- ...-line-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...w-sc-line-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...generator-method-privatename-identifier.js | 133 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 133 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 121 +++++++++++++ ...generator-method-privatename-identifier.js | 122 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 107 +++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 107 +++++++++++ ...identifier-initializer-alt-by-classname.js | 101 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...ne-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...-new-sc-line-method-rs-field-identifier.js | 8 +- ...ne-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...c-line-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...generator-method-privatename-identifier.js | 133 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 132 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 133 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 121 +++++++++++++ ...generator-method-privatename-identifier.js | 122 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 107 +++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 107 +++++++++++ ...identifier-initializer-alt-by-classname.js | 101 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...vate-direct-eval-err-contains-newtarget.js | 2 +- ...te-indirect-eval-err-contains-newtarget.js | 2 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...nitions-rs-field-identifier-initializer.js | 8 +- ...regular-definitions-rs-field-identifier.js | 8 +- ...finitions-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...s-rs-privatename-identifier-initializer.js | 10 +- ...r-definitions-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...async-method-privatename-identifier-alt.js | 120 +++++++++++++ ...tic-async-method-privatename-identifier.js | 121 +++++++++++++ ...rator-method-privatename-identifier-alt.js | 109 ++++++++++++ ...generator-method-privatename-identifier.js | 110 ++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 95 ++++++++++ ...ns-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 95 ++++++++++ ...identifier-initializer-alt-by-classname.js | 89 ++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...itions-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...ync-gen-rs-field-identifier-initializer.js | 8 +- ...same-line-async-gen-rs-field-identifier.js | 8 +- ...async-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...ine-async-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 135 ++++++++++++++ ...generator-method-privatename-identifier.js | 136 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 135 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 136 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 124 +++++++++++++ ...generator-method-privatename-identifier.js | 125 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 110 ++++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 110 ++++++++++++ ...identifier-initializer-alt-by-classname.js | 104 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...nc-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...e-line-async-method-rs-field-identifier.js | 8 +- ...nc-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...-async-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 134 ++++++++++++++ ...generator-method-privatename-identifier.js | 135 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 134 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 135 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 123 +++++++++++++ ...generator-method-privatename-identifier.js | 124 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 109 ++++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 109 ++++++++++++ ...identifier-initializer-alt-by-classname.js | 103 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...ine-gen-rs-field-identifier-initializer.js | 8 +- ...ields-same-line-gen-rs-field-identifier.js | 8 +- ...-line-gen-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...n-rs-privatename-identifier-initializer.js | 10 +- ...same-line-gen-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...en-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...ne-gen-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...-method-rs-field-identifier-initializer.js | 8 +- ...ds-same-line-method-rs-field-identifier.js | 8 +- ...ne-method-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...d-rs-privatename-identifier-initializer.js | 10 +- ...e-line-method-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...generator-method-privatename-identifier.js | 132 ++++++++++++++ ...async-method-privatename-identifier-alt.js | 131 ++++++++++++++ ...tic-async-method-privatename-identifier.js | 132 ++++++++++++++ ...rator-method-privatename-identifier-alt.js | 120 +++++++++++++ ...generator-method-privatename-identifier.js | 121 +++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 106 +++++++++++ ...od-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 106 +++++++++++ ...identifier-initializer-alt-by-classname.js | 100 +++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...method-rs-static-privatename-identifier.js | 10 +- ...tename-identifier-semantics-stringvalue.js | 10 +- ...d-in-sc-rs-field-identifier-initializer.js | 8 +- ...ields-wrapped-in-sc-rs-field-identifier.js | 8 +- ...ped-in-sc-rs-privatename-identifier-alt.js | 10 +- ...-privatename-identifier-initializer-alt.js | 10 +- ...c-rs-privatename-identifier-initializer.js | 10 +- ...wrapped-in-sc-rs-privatename-identifier.js | 10 +- ...rator-method-privatename-identifier-alt.js | 122 +++++++++++++ ...generator-method-privatename-identifier.js | 123 +++++++++++++ ...async-method-privatename-identifier-alt.js | 122 +++++++++++++ ...tic-async-method-privatename-identifier.js | 123 +++++++++++++ ...rator-method-privatename-identifier-alt.js | 111 ++++++++++++ ...generator-method-privatename-identifier.js | 112 ++++++++++++ ...tatic-method-privatename-identifier-alt.js | 22 +-- ...rs-static-method-privatename-identifier.js | 16 +- ...privatename-identifier-alt-by-classname.js | 97 ++++++++++ ...sc-rs-static-privatename-identifier-alt.js | 10 +- ...tic-privatename-identifier-by-classname.js | 97 ++++++++++ ...identifier-initializer-alt-by-classname.js | 91 ++++++++++ ...-privatename-identifier-initializer-alt.js | 10 +- ...atic-privatename-identifier-initializer.js | 10 +- ...-in-sc-rs-static-privatename-identifier.js | 10 +- ...ate-fields-proxy-default-handler-throws.js | 28 +++ ...grammar-field-def-has-initializer-no-sc.js | 31 ---- ...rammar-field-no-initializer-with-method.js | 32 ---- .../class/syntax-error-grammar-fields.js | 31 ---- ...-privatename-no-initializer-with-method.js | 35 ---- .../class/syntax-error-grammar-privatename.js | 34 ---- .../syntax-error-grammar-privatenames.js | 34 ---- ...mmar-field-identifier-invalid-ues-error.js | 6 +- ...mmar-field-identifier-invalid-zwj-error.js | 6 +- ...mar-field-identifier-invalid-zwnj-error.js | 6 +- ...yntax-invalid-grammar-privatename-error.js | 4 +- ...mmar-privatename-identifier-invalid-ues.js | 10 +- ...rivatename-identifier-invalid-zwj-error.js | 10 +- ...ivatename-identifier-invalid-zwnj-error.js | 10 +- ...ivatename-identifier-non-id-start-error.js | 65 ------- ...ar-privatename-identifier-non-ues-error.js | 65 ------- ...id-grammar-privatenames-same-line-error.js | 2 +- ...-field-classelementname-initializer-alt.js | 4 +- ...mmar-field-classelementname-initializer.js | 4 +- ...ntax-valid-grammar-field-identifier-alt.js | 4 +- .../syntax-valid-grammar-field-identifier.js | 4 +- .../syntax-valid-grammar-fields-multi-line.js | 2 +- ...tename-classelementname-initializer-alt.js | 10 +- ...rivatename-classelementname-initializer.js | 10 +- ...ax-valid-grammar-privatename-identifier.js | 10 +- ...-privatename-no-initializer-with-method.js | 2 +- ...x-valid-grammar-privatenames-multi-line.js | 2 +- 828 files changed, 40038 insertions(+), 3399 deletions(-) create mode 100644 test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js delete mode 100644 test/language/expressions/class/fields-computed-name-propname-constructor.js delete mode 100644 test/language/expressions/class/fields-computed-name-static-propname-constructor.js create mode 100644 test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js delete mode 100644 test/language/expressions/class/syntax-error-grammar-field-def-has-initializer-no-sc.js delete mode 100644 test/language/expressions/class/syntax-error-grammar-field-no-initializer-with-method.js delete mode 100644 test/language/expressions/class/syntax-error-grammar-fields.js delete mode 100644 test/language/expressions/class/syntax-error-grammar-privatename-no-initializer-with-method.js delete mode 100644 test/language/expressions/class/syntax-error-grammar-privatename.js delete mode 100644 test/language/expressions/class/syntax-error-grammar-privatenames.js delete mode 100644 test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js delete mode 100644 test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js create mode 100644 test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js create mode 100644 test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js create mode 100644 test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js create mode 100644 test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js create mode 100644 test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js create mode 100644 test/language/statements/class/static-private-fields-proxy-default-handler-throws.js delete mode 100644 test/language/statements/class/syntax-error-grammar-field-def-has-initializer-no-sc.js delete mode 100644 test/language/statements/class/syntax-error-grammar-field-no-initializer-with-method.js delete mode 100644 test/language/statements/class/syntax-error-grammar-fields.js delete mode 100644 test/language/statements/class/syntax-error-grammar-privatename-no-initializer-with-method.js delete mode 100644 test/language/statements/class/syntax-error-grammar-privatename.js delete mode 100644 test/language/statements/class/syntax-error-grammar-privatenames.js delete mode 100644 test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js delete mode 100644 test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js diff --git a/test/language/expressions/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index abc30af89f..31fbd9c027 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier-initializer.js index 4c9cb38386..e9fe1af222 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier.js index f4cd4bdd9e..7ecdcd869e 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js index a75596b0d0..10bbfa7f63 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js index 17896a22bd..7e4a049c7a 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js index c0ee0b4924..20e88310ce 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier.js index fafb30e5ea..80a7dfe4f0 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..fc911d0320 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..3963332d19 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..045a3015ad --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..dc66bc6b8b --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..b476ac548a --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..04f3dda18f --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js index e3c927ecaa..7372e4720d 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { *m() { return 42; } 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; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js index f583254b5b..7b45208a11 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..ada5b05221 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js index 46d1a107a4..f7865d1028 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..43163c6667 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..8d08251ed4 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js index cb66f59c8a..e9bf428237 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js index 9cf2145b03..2ce79ee705 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier.js index 18aa8bd979..db577ad230 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 7dec72eaa0..bf74279e57 100644 --- a/test/language/expressions/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier-initializer.js index 0a0fdebfdc..574a373ae2 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier.js index 89cd17b992..a3705642c3 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-alt.js index b5ea3953f9..600cd311cf 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js index 8c11ae4160..4d3fc67929 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js index ee9058804f..54a9e1ad1d 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier.js index b8985cd3b4..8adb68dffc 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..252484c0ad --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..e21b8a4dd5 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..40e7f5f105 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..266dc9bc88 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..fa9c6081c5 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..fd80b63356 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js index a450a689d0..e076c3c26f 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { m() { return 42; } 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; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js index 5b00501645..6c97cb9e26 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..15f3cce394 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js index 57b8d679a3..dc58f24424 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..341e50116c --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..5283ca0b9b --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js index 398218314b..50ca931e6e 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js index ca2286d78f..2267dd4427 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier.js index 172bc77851..0393b7b011 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js index 3fac03c1e5..ec7fbec04c 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js index ebdad02016..87bb10775f 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier.js index 5d6cc1dede..cdf3f000f7 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js index 9bceb8ad1f..bf0b03b253 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js index 43143675db..718948e078 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js index 8e3a001a3d..9a45f465ed 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js index c8e9e4a152..f1693b695e 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..84e248f8a4 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..fa4f68e1b7 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..cd4791232b --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..d4209a9fd3 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..9872898804 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..cca95d074c --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,125 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js index c3adc2883a..8c1b3ec4ae 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static async *m() { return 42; } 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; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js index 2e339ebfe3..3367d390f4 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..41b6ead3f0 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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 + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js index cefca0895d..fae74f1829 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..a646301450 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..09fce36734 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,104 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js index cf52bf9422..c35ef2e3ca 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js index 650296ac2b..b3bae16d27 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js index 6f82a68b6a..c898059164 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js index a124cb4b34..5e932402ae 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js index 6ab83cfbd0..cc3a4aef07 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier.js index 1913470f62..6a6270a478 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js index c319e0f2e9..df53d38f99 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js index 27b99bc832..950a23d17a 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js index b8e4f8304e..2a734e15f6 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js index ce08f25507..2aeb93b8c8 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..a1ebbc4c7a --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..f062838678 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..3d80577fa5 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..842b65e3b8 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..02ed350661 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..194dc3d999 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js index 3393a2553d..018063c0e9 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static async m() { return 42; } 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; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js index 946645e069..a0124ed6dc 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..d121c08459 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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 + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js index 413a1fc6f0..bb4679d89f 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..1460024a08 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..f1ce0e6a3b --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,103 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js index dd25aee729..741cc639d6 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js index 5f13258900..ee6fedcc0d 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js index a40dcffc39..ee079a906d 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js index a3985c5b61..e1474b254c 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js index 1af61bd812..2a1569c49c 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier.js index 3c8431712e..4f2b126cae 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js index ce0b449d92..1e1df640c4 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js index 0ce52d94e5..050b4e1a16 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js index 3134c68851..1b94d1d3e1 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier.js index af70e7e929..3e061acfc9 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..7ed3135c5e --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..6f0571f81c --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..6b3b70942a --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..86413985cc --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..67e21fb3f7 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..fd57c93431 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js index f282f026aa..60c3dba7c9 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static *m() { return 42; } 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; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js index b82b9c0105..47e506abab 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..741df420b9 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js index f28b29fb0a..f6e47583c3 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..741064eb74 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..c90867a187 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js index dbc6e893cc..09254197c0 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js index d8849231f6..985e942aa7 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js index 0e240f1e59..927769ff8a 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js index c9d3d3aa49..241fbbac17 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js index 6a2095badb..077e2611e7 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier.js index 136b3c42f9..226bcfa0b6 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js index 79caa36ce4..5432fe04a6 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js index c94c0151ad..b13268cab7 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js index d22e890101..c15f65b158 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier.js index 60c062b25b..c264e12bc9 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..8b81ed9948 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..dba6451cf2 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..2446833035 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..661c1e1f6c --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..8ea5bb1746 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..f1ce1992d4 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js index 4190a189f9..cfe752d237 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static m() { return 42; } 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; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js index 0195586210..cb14eea43e 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..803cfa2ae4 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js index b2e00cc339..d29955a673 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..254e3236ce --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..c863d36b40 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js index 69b632cd70..3e4d054b99 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js index 2e22625d06..6258c9eb35 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js index 1dded9c225..e763c6920c 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-computed-name-propname-constructor.js b/test/language/expressions/class/fields-computed-name-propname-constructor.js deleted file mode 100644 index 0050e3a7e5..0000000000 --- a/test/language/expressions/class/fields-computed-name-propname-constructor.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2017 Valerie Young. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -description: class fields forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -info: | - Static Semantics: PropName - ... - ComputedPropertyName : [ AssignmentExpression ] - Return empty. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : FieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "constructor". - - -negative: - phase: parse - type: SyntaxError - ----*/ - -throw "Test262: This statement should not be evaluated."; - -var x = "constructor"; -var C = class { - [x]; -}; diff --git a/test/language/expressions/class/fields-computed-name-static-propname-constructor.js b/test/language/expressions/class/fields-computed-name-static-propname-constructor.js deleted file mode 100644 index 748e3fb53f..0000000000 --- a/test/language/expressions/class/fields-computed-name-static-propname-constructor.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2017 Valerie Young. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -description: static class field forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -info: | - Static Semantics: PropName - ... - ComputedPropertyName : [ AssignmentExpression ] - Return empty. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : static FieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - -negative: - phase: parse - type: SyntaxError - ----*/ - -throw "Test262: This statement should not be evaluated."; - -var x = "constructor"; -var C = class { - static [x]; -}; diff --git a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js index dd380aacfe..1b897d8fcf 100644 --- a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js index e7a2fde569..1899fdc30b 100644 --- a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js @@ -9,7 +9,7 @@ flags: [generated] info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js index e518d46538..f45e7629af 100644 --- a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js index c7954bc69c..4471caaecd 100644 --- a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperProperty. diff --git a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js index a9c97fe8cd..b707c1f8af 100644 --- a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js index c983e887ce..ec42afd792 100644 --- a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js @@ -9,7 +9,7 @@ flags: [generated] info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js index 44bb95f62f..b41c09f2ca 100644 --- a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js index 9878a14a92..0c362d3483 100644 --- a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperProperty. diff --git a/test/language/expressions/class/fields-direct-eval-err-contains-newtarget.js b/test/language/expressions/class/fields-direct-eval-err-contains-newtarget.js index 9422ebd006..45319d97c0 100644 --- a/test/language/expressions/class/fields-direct-eval-err-contains-newtarget.js +++ b/test/language/expressions/class/fields-direct-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Functions These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains NewTarget. diff --git a/test/language/expressions/class/fields-indirect-eval-err-contains-newtarget.js b/test/language/expressions/class/fields-indirect-eval-err-contains-newtarget.js index e008008671..5be82598ac 100644 --- a/test/language/expressions/class/fields-indirect-eval-err-contains-newtarget.js +++ b/test/language/expressions/class/fields-indirect-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Functions These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains NewTarget. diff --git a/test/language/expressions/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js index 0712be6cc6..5f28bba197 100644 --- a/test/language/expressions/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier-initializer.js index 632c8c119b..ccb0922862 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier.js index 93f5643f5a..2182bd8c07 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-alt.js index 7052d732da..389100aaf3 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js index 739ce1027a..114b919cc0 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js index dcb8bd0091..150b9a9bee 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier.js index 7f418d1f4c..0a3111c0e1 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..5ccf01a63f --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,167 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..4e45cd1f00 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,168 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + m2() { return 39 } + bar = "barbaz"; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..4f6a69137c --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,167 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..c3b771c848 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,168 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..b72e78cfb0 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,156 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + } + m2() { return 39 } + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..4aa37a2528 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,157 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + m2() { return 39 } + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js index 8d63cb93eb..aad1574fd9 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple fields definitions) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -61,27 +61,21 @@ var C = class { foo = "foobar"; m() { return 42 } 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; } m2() { return 39 } diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js index 1cd184c5c7..3beabd3caf 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple fields definitions) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..e76fe2194a --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,142 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J + m2() { return 39 } + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js index b3a0eb1889..a4aecf0902 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..7d0d6a5357 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,142 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + m2() { return 39 } + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..b42dede64c --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1 + m2() { return 39 } + bar = "barbaz"; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js index 6839f876e9..a60032da25 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js index 0c388f3982..d8a7f0138c 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier.js index 644647bd0d..ec05e80b35 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js index f555657293..cffbc53894 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js index 0ebd53481d..23e0f2edae 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier.js index bbf70435d5..116c52371f 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js index 602aa8cd56..5185db4a44 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js index 0e6bdc88f5..5b621643b5 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js index 803bdbe03b..d1f771e422 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js index e28f81ae7b..ead0cae70f 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..779ab2384b --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,145 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..8960c89dfb --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,146 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + foo = "foobar" + bar = "barbaz"; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..b8b3896d66 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,145 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..76f37810d3 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,146 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..4840c98d97 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + } + foo = "foobar" + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..d1ef00fc02 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + foo = "foobar" + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js index 385f8bd798..2981baa14e 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple stacked fields definitions through ASI) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { 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; } foo = "foobar" diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js index f2cd4be402..496767613f 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple stacked fields definitions through ASI) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..0e98462493 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J + foo = "foobar" + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js index e476161bd0..8e36a93a5c 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..c51bd453f8 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + foo = "foobar" + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..43f072b128 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,114 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1 + foo = "foobar" + bar = "barbaz"; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js index ab1705896e..14655baa81 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js index b8916c68b5..9c5cafff52 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js index 7ece03a60f..12a2ba0437 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js index d1379b96ba..60b5762ad2 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js index 33368c9728..2386702204 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier.js index 038b2feb76..0c4b4d3975 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js index fa5056e237..156eba91d7 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js index 6a082a7b0c..b889bd1468 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js index af503cae70..d819783d38 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier.js index f3d0cbb698..11d90ac7a8 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..042ffc2567 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + } + m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..76a4c887ec --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..eab19a8ffd --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + } + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..f98fe88157 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..33950f9664 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + } + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..ada54f0158 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js index d6b0423dbb..f53ddc736f 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line without a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { 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; } m() { return 42; } diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js index 42383a312e..315bf3efa5 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line without a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..5eb6aeea28 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js index 83e9e56b31..e1901a7d50 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..e36a133454 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..39d8929c47 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1 + m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js index aa5f913d2c..532d44b88b 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js index 28d9712a7e..b03835cb9c 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js index be24db224f..b37c209251 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index ec6fa5ac28..61f85f900c 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js index c20042d7b9..2a90a47d81 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier.js index 9d90b1932c..fd7fc0eaed 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js index b3f83f12e2..89efbc4d6d 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js index 5a7ed4f9d7..3edc04ef26 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js index 131e929802..2bed89d338 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier.js index 303faedec2..615111f11b 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..c4b9e37137 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + *m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..941da6fcbf --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + *m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..d53e4a9216 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..ba7b86fe17 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..d7a6c8ef22 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..154156c8e6 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js index 34b6e8aad9..da37a639cf 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { 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; }; *m() { return 42; } diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js index c35499141e..e0d1a96cc2 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..6a4e753196 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js index 79abd2b1d7..cb72dc839c 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..dcb5086e2b --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..6caa6e15ec --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + *m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js index 56d10480f4..3d4ce691ff 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js index 8d3616dbbb..a2aecdf301 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js index a51d2a0a70..92421ec3b7 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 5c07c4cdb3..94e7b8dab3 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier-initializer.js index e643193c31..951beaa393 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier.js index 0bf202d1f4..3d4b1884b8 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js index 068dc85b68..19e1b4ad62 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js index d041281690..f3d0fcdd58 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js index a7b65c1618..5bce1573d3 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier.js index 3985fcc021..48f59120f1 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..89265d3fc2 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..616f3a3f7a --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..7990d7a4dc --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..f47bbd4519 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..d3ec9ff36e --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..ad929a09c7 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js index d4806f6263..e03bfbbb63 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { 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; }; m() { return 42; } diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js index e1f09a5315..45555d4a19 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..f06b9a21d4 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js index 3328f4b152..526c28b065 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..b1979020b5 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..fefd7689b0 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js index 362b98deac..354d4abc30 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js index ace5e03f92..5f9e79ab36 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier.js index cc7d1938eb..26d05e28f9 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-private-direct-eval-err-contains-newtarget.js b/test/language/expressions/class/fields-private-direct-eval-err-contains-newtarget.js index 2273bc4dfd..4cff46aed7 100644 --- a/test/language/expressions/class/fields-private-direct-eval-err-contains-newtarget.js +++ b/test/language/expressions/class/fields-private-direct-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Functions These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains NewTarget. diff --git a/test/language/expressions/class/fields-private-indirect-eval-err-contains-newtarget.js b/test/language/expressions/class/fields-private-indirect-eval-err-contains-newtarget.js index 42e0f30ecf..54fdb2a809 100644 --- a/test/language/expressions/class/fields-private-indirect-eval-err-contains-newtarget.js +++ b/test/language/expressions/class/fields-private-indirect-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Functions These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains NewTarget. diff --git a/test/language/expressions/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js index 041cfcc2e5..27060a55a2 100644 --- a/test/language/expressions/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-regular-definitions-rs-field-identifier-initializer.js index 1e0e3cdde1..66a45fb468 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-field-identifier-initializer.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-field-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-field-identifier.js index ad9c241d8f..8afe1f867b 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-field-identifier.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-field-identifier.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-alt.js index b02fcda1cd..055469d5c4 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js index c73a77c87f..c9ff8690fd 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer.js index bf416c4434..0ad86b1ef2 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier.js index 769990cab6..57e4b077bd 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..d656a76097 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..6ee58c844c --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..23e406a28f --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..b5800b5c77 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..6dc6cf0c17 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..d5a380ed39 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js index c80aa0fb19..721016953d 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (regular fields defintion) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -58,27 +58,21 @@ info: | var C = class { 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; } static $(value) { diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier.js index e6081cec13..2f2f562b38 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (regular fields defintion) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..6f2cef7be2 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,95 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +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 + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js index 2f02754482..07baed21d8 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..dbd238fdca --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,95 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +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); + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..1235ee3ee1 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,89 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1 + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +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); + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js index 48835e88a7..e2cbb9e7bc 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js index bc7881bbd3..bc1cbda6c9 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier.js index 7d220b583c..6b92096a84 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js index beb3cc2488..b748989fa0 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier-initializer.js index bbdfedbb51..19577f96c5 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier.js index beecac0890..998d5833e2 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js index 7735511177..7c5a1ade62 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js index 637644f0e4..0414c25392 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js index 87052a49a2..26e2bbeb28 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier.js index 087e6b602c..db34f0e027 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..60267b241e --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..f43c71c90b --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..c49fe30888 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..5a04dc9dd4 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..a2735fc801 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..3d4332e3cb --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,125 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js index 5863e85032..f996692565 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { async *m() { return 42; } 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; }; static $(value) { diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js index 3f4c9d669c..f412f24f64 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..4a67be1fdd --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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 + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js index 56c4ad6330..5bbb93a64f 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..1ee0e6c603 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..0fcad31030 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,104 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js index 7a69dae3c6..7c61c13b20 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js index 98f953fefc..8fec6d6252 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier.js index eb6574f69c..ef41a0853a 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js index 47e9e32ab5..dc9750b233 100644 --- a/test/language/expressions/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier-initializer.js index b68f5a4f9a..7492d169e4 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier.js index f326a177f7..418b6bb5cb 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-alt.js index 2a88cedd6c..5f99dd5ece 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js index 999e3030b7..2ad6e564e1 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js index 44c1648c12..43367d150e 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier.js index a8e9636aa6..3ec6a7ceb2 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..26bf78ab93 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..e5122fd210 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..7a831c45c6 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..8a32100ecc --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..54ebe240d2 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..cf3e86f543 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js index c313384155..fc0ec082b3 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { async m() { return 42; } 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; }; static $(value) { diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js index 68b413796a..bfeede6da5 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..bc9f3384d3 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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 + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js index ee21047e7e..3fe7bf6f27 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..db6376c81f --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..2a6168162d --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,103 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js index 29310bb8d5..c5c15676b3 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js index 6776f3be0e..b372055420 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier.js index 290a73d447..ca85618524 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index 3ba63e3ffc..1137042dd9 100644 --- a/test/language/expressions/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-same-line-gen-rs-field-identifier-initializer.js index df763485f5..b1316fda6f 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-field-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-field-identifier.js index 6e13fd26d8..9337a10635 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-alt.js index 3d07448b0d..a8426cd70d 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js index a74bc215f8..f36b8d6c15 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer.js index f663a4fff8..825cfca783 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier.js index 307ad86868..fb102640fa 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..66d0cc40fd --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; *m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..beb17a4454 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; *m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..8b47183cfb --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..3b9eae4956 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..ca5a52108f --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..ca34befd92 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js index 8626d4d9ce..3918ab35d1 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a generator method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { 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; }; *m() { return 42; } static $(value) { diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier.js index e75c4c43fb..3d31b28163 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a generator method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..d8836a8872 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js index 3a46e362c5..c9c2a76489 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..d423e038c1 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..bfe5e23174 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; *m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js index 48dfcc5dc2..ca132e0252 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js index d9fd2bd514..582f446ed1 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier.js index 95394cbfc4..c2e6413009 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 43d49b5254..b96b8580ed 100644 --- a/test/language/expressions/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-same-line-method-rs-field-identifier-initializer.js index d75572687c..627e25df6b 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-field-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-field-identifier.js index 52788e419e..fbedc11a31 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-same-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-alt.js index 6a65f2782d..a404b09cac 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js index 2fcabecf4e..cc836dc7a4 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer.js index 0204afa5e6..3c7bba56d8 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier.js index b105329911..a509074c7c 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..8bd431c404 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..ef3c0c7ad4 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..df91eba8c4 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..94acd5fb90 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..3cc1e09920 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..5dfeb484e6 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js index 3aad6acb36..deb0728cb3 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { 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; }; m() { return 42; } static $(value) { diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier.js index 7079bb7a6f..336bb8b1d9 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..cf64819064 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt.js index e60739d025..b37f3ef8d3 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..d731183f00 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..9979389007 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js index 4490b98386..be2a90f3a6 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js index 54220041d4..3ebb2f1816 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier.js index cc08c93317..36681c0beb 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js index 53c726d831..c29dc26069 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js index 6a13112465..651ba78411 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier.js index 77f2f760df..900646d589 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js index b7e59d2270..85d8769800 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js index 1590c6fbec..b92351ee56 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js index 4e9eb7d88d..5e5b6d2fe0 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier.js index dc07187285..423f695d09 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..826c112aa8 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + };;;;;;; + ;;;; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..57027d8e82 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + };;;;;;; + ;;;; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..21f9222941 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static AsyncMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + };;;;;;; + ;;;; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..d0322faa9b --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static AsyncMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + };;;;;;; + ;;;; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..d4c4195bb9 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,111 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static GeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + };;;;;;; + ;;;; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..4331108e29 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,112 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static GeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + };;;;;;; + ;;;; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js index d451faabf1..da67af6171 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (fields definition wrapped in semicolons) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { ;;;; ;;;;;;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; };;;;;;; ;;;; diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js index 718e57c760..81eb74e209 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (fields definition wrapped in semicolons) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..2bb649ac3c --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,97 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;;;;;;; + ;;;; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +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 + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js index 56476171f5..72fdc5a461 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..032f6f5445 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,97 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;;;;;;; + ;;;; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +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); + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..c454787325 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,91 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;;;;;;; + ;;;; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +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); + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js index 91f24eddda..5a78f0f152 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js index 600d128f4b..6878665575 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js index 96d00ea178..a311dbfb48 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/static-private-fields-proxy-default-handler-throws.js b/test/language/expressions/class/static-private-fields-proxy-default-handler-throws.js index 9649b5406a..86a59a668f 100644 --- a/test/language/expressions/class/static-private-fields-proxy-default-handler-throws.js +++ b/test/language/expressions/class/static-private-fields-proxy-default-handler-throws.js @@ -22,7 +22,7 @@ var C = class { var P = new Proxy(C, {}); -assert.sameValue(C.x, 1); +assert.sameValue(C.x(), 1); assert.throws(TypeError, function() { - P.x; + P.x(); }); diff --git a/test/language/expressions/class/syntax-error-grammar-field-def-has-initializer-no-sc.js b/test/language/expressions/class/syntax-error-grammar-field-def-has-initializer-no-sc.js deleted file mode 100644 index fbaef4ff02..0000000000 --- a/test/language/expressions/class/syntax-error-grammar-field-def-has-initializer-no-sc.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-field-def-has-initializer-no-sc.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - x = [] -}; diff --git a/test/language/expressions/class/syntax-error-grammar-field-no-initializer-with-method.js b/test/language/expressions/class/syntax-error-grammar-field-no-initializer-with-method.js deleted file mode 100644 index 8d5165aeea..0000000000 --- a/test/language/expressions/class/syntax-error-grammar-field-no-initializer-with-method.js +++ /dev/null @@ -1,32 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-field-no-initializer-with-method.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - x - m() {} -}; diff --git a/test/language/expressions/class/syntax-error-grammar-fields.js b/test/language/expressions/class/syntax-error-grammar-fields.js deleted file mode 100644 index 6407595550..0000000000 --- a/test/language/expressions/class/syntax-error-grammar-fields.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-fields.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-public, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - x y -}; diff --git a/test/language/expressions/class/syntax-error-grammar-privatename-no-initializer-with-method.js b/test/language/expressions/class/syntax-error-grammar-privatename-no-initializer-with-method.js deleted file mode 100644 index fd4b1769c8..0000000000 --- a/test/language/expressions/class/syntax-error-grammar-privatename-no-initializer-with-method.js +++ /dev/null @@ -1,35 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-no-initializer-with-method.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - #x - m() {} -}; diff --git a/test/language/expressions/class/syntax-error-grammar-privatename.js b/test/language/expressions/class/syntax-error-grammar-privatename.js deleted file mode 100644 index 27af62cf40..0000000000 --- a/test/language/expressions/class/syntax-error-grammar-privatename.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - # x -}; diff --git a/test/language/expressions/class/syntax-error-grammar-privatenames.js b/test/language/expressions/class/syntax-error-grammar-privatenames.js deleted file mode 100644 index 8ee4dfe277..0000000000 --- a/test/language/expressions/class/syntax-error-grammar-privatenames.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatenames.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - #x #y -}; diff --git a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js index e12ecfb47f..2a6f584d7b 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-ues-error.case // - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js index 9dd80bef4e..ed1209dbcb 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-zwj-error.case // - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js index efed7d1a68..2fb44276e4 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-zwnj-error.case // - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-error.js index 9fa2055c0d..378ea8d9ea 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-privatename-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-privatename-error.case // - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template /*--- -description: SyntaxError (class expression) +description: No space allowed between sigial and IdentifierName (class expression) esid: prod-ClassElement features: [class-fields-private, class] flags: [generated] @@ -24,7 +24,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js index 07c84a94b3..b7675a2758 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js +++ b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js index ff96485732..e6ddc39884 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js index 4e5187f254..673cd74c5c 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js deleted file mode 100644 index 6628fbc8c5..0000000000 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js +++ /dev/null @@ -1,65 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-identifier-non-id-start-error.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: Valid PrivateName Syntax (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -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 - - - 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". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - #\u{00}; -}; diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js deleted file mode 100644 index c652458c3c..0000000000 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js +++ /dev/null @@ -1,65 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-identifier-non-ues-error.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: Valid PrivateName Syntax (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -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 - - - 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". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - #\u0000; -}; diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatenames-same-line-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatenames-same-line-error.js index 3c784f2c8a..808025a871 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-privatenames-same-line-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-privatenames-same-line-error.js @@ -24,7 +24,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer-alt.js b/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer-alt.js index 2208a98776..424abf5774 100644 --- a/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer-alt.js +++ b/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer-alt.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer.js b/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer.js index 9d5f47865f..0580ae14ec 100644 --- a/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer.js +++ b/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-valid-grammar-field-identifier-alt.js b/test/language/expressions/class/syntax-valid-grammar-field-identifier-alt.js index 66d2ac85ca..c7aaad46d7 100644 --- a/test/language/expressions/class/syntax-valid-grammar-field-identifier-alt.js +++ b/test/language/expressions/class/syntax-valid-grammar-field-identifier-alt.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-valid-grammar-field-identifier.js b/test/language/expressions/class/syntax-valid-grammar-field-identifier.js index 84e3d3babf..751697b188 100644 --- a/test/language/expressions/class/syntax-valid-grammar-field-identifier.js +++ b/test/language/expressions/class/syntax-valid-grammar-field-identifier.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-valid-grammar-fields-multi-line.js b/test/language/expressions/class/syntax-valid-grammar-fields-multi-line.js index 31c2a2636a..48b39d2ca5 100644 --- a/test/language/expressions/class/syntax-valid-grammar-fields-multi-line.js +++ b/test/language/expressions/class/syntax-valid-grammar-fields-multi-line.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-fields-multi-line.case // - src/class-fields/syntax/valid/cls-expr-fields-valid-syntax.template /*--- -description: SyntaxError (class expression) +description: Valid multi-line, multi-field (class expression) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] diff --git a/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js b/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js index 402984e744..cb310e0021 100644 --- a/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js +++ b/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js @@ -21,26 +21,26 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName Initializer : = AssignmentExpression - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer.js b/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer.js index 2300ceb9bb..d9e6c49655 100644 --- a/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer.js +++ b/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer.js @@ -21,26 +21,26 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName Initializer : = AssignmentExpression - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-valid-grammar-privatename-identifier.js b/test/language/expressions/class/syntax-valid-grammar-privatename-identifier.js index 3dd423e459..283eb780bc 100644 --- a/test/language/expressions/class/syntax-valid-grammar-privatename-identifier.js +++ b/test/language/expressions/class/syntax-valid-grammar-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-valid-grammar-privatename-no-initializer-with-method.js b/test/language/expressions/class/syntax-valid-grammar-privatename-no-initializer-with-method.js index 59c168d547..4b66f99726 100644 --- a/test/language/expressions/class/syntax-valid-grammar-privatename-no-initializer-with-method.js +++ b/test/language/expressions/class/syntax-valid-grammar-privatename-no-initializer-with-method.js @@ -21,7 +21,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/expressions/class/syntax-valid-grammar-privatenames-multi-line.js b/test/language/expressions/class/syntax-valid-grammar-privatenames-multi-line.js index 12c752cead..33ae15a190 100644 --- a/test/language/expressions/class/syntax-valid-grammar-privatenames-multi-line.js +++ b/test/language/expressions/class/syntax-valid-grammar-privatenames-multi-line.js @@ -21,7 +21,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/statements/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index f0d5d3d869..d75224d3f4 100644 --- a/test/language/statements/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier-initializer.js index bb5b0c29cb..6b30d43bd9 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier.js index 8ad3b28987..cc8d4da3e5 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js index d3ff9843a6..fa7f44be75 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js index 57020b3038..a0b7b95926 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js index 3ed96ba41e..d92d4a349f 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier.js index 21c2743ab5..148e8316dd 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..9371edf280 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..530f0feddb --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..2e5a52fb1a --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..17737b4de4 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..7f9fdda341 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..0cefd9ca02 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js index 9d7602d88a..81d5f8a4c1 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { *m() { return 42; } 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; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js index 10801eb81d..d286e9192c 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..ae4dfe1085 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js index 77b9bc9dc6..f93a60dcc1 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..d83143d05a --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..26412e49f6 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js index 31184005f2..828d7cf6bb 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js index 879397ec08..e20380d0fc 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier.js index 68718363b5..fc731bd88f 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 61b6da15b2..da5e252052 100644 --- a/test/language/statements/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-method-rs-field-identifier-initializer.js index fb52206576..334f5ec285 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-field-identifier.js index baad9d3789..69d97d811e 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-alt.js index 0df46fd173..71be3d826b 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js index 0ec2d10a1a..f2bac39182 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js index ca70313036..7702905866 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier.js index e5a1a42578..fca2d35e25 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..314c7a6157 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..fcf17e7581 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..75d8b18954 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..6bba34272b --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..1ff8aa7651 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..f0fd6fe03d --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js index 9307410f92..655b12f335 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { m() { return 42; } 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; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js index c8674d0806..d01ecc5d87 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..15efc9e014 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js index 5966b9f911..5e4685a351 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..574b0cd95a --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..b96c6491ca --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js index 1a79b9f781..70f4654933 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js index 0effbde88b..dc566dee26 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier.js index 225353687c..01ee0a655f 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js index 00a11b1b80..4193fd5db7 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js index 31e9d4bd02..c0d859ba0d 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier.js index 37a91f8367..84fe450313 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js index 2e3f7e474d..545545a679 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js index 71ba207ac6..3e40782756 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js index cb27bfb4e8..0bae129936 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js index 88e75b193c..ae07249fe7 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..69a1935680 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..34953644e6 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..894787f2c8 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..b99a59d829 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..efb94dcd9f --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..e7b11c3084 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,125 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js index 1dbf9e7330..2f1ced3434 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static async *m() { return 42; } 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; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js index 8cc3b1eaf3..9bd6795357 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..e0c1b6eac9 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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 + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js index 3d53db9e2b..74f43bce35 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..27fc914429 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..caeb85e57e --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,104 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js index dc2457f1b4..5e596a3b25 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js index 6e0bd25a22..b1ae4c245b 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js index e154ad948d..1859796b85 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js index af52cae65b..e4b1f887e2 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js index 9cd2102348..ccc54913a7 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier.js index f265b554a1..2fbf002c49 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js index 2c1614bf00..eb06ab96dd 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js index e77d1ee1d6..6ac29798eb 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js index 615777f71f..4a717a34d0 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js index 6dd90ca9d8..456a141c7a 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..2ae364efaf --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..7a20229408 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..cd55d42a01 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..8723f43953 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..f8b8fbb120 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..eaa3d8e082 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js index a90f56c3fe..a47214d972 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static async m() { return 42; } 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; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js index e3ae14e8dc..5519040ed4 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..424a78f852 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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 + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js index 79460938b7..8b3699533c 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..7a9b92ba26 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..883090c625 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,103 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js index a3a825ad92..f290fda1c2 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js index bf5c8cc24f..ea5be51cc4 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js index a38f6c4d74..bbf4349800 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js index 0991ff9354..d6a424d25d 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js index 5d3c96d910..ff9665046e 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier.js index 30d0d1e4e9..d3e63faa91 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js index 30ccd4f707..20a5b47ed1 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js index a924e0a11f..b67f76c474 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js index f8a948131c..6e11bd2fa2 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier.js index 682f1fdabc..d93ec247c9 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..400d167e2b --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..6880c808e9 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..4ed6420d6a --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..6ff146d729 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..bf3f71dada --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..e9ab085db6 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js index 910ec2e31c..219ca19314 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static *m() { return 42; } 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; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js index 8df748077f..08d95b8ba2 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..8d4d2322d6 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js index 8eba30baf7..f25a6d1de1 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..342cfcfe8a --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..316571e430 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js index aa4abf04b3..06e10db2d3 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js index 2e0cbb484c..f008e11b3c 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js index 9ee640049e..18776b0c36 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js index 82393b1bfe..f4d6073a84 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js index 24fb8b5632..30d4c55e83 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier.js index cff5a7f9c9..69af3c1dc7 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js index afe1dcac02..106db2b63a 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js index 047f50e714..6cade15711 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js index 73abdab8c2..e32bda4914 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier.js index d736747c32..f753d298fb 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..2766d3c61e --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..aaaf0f82d5 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..aa5e779b87 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..cb7c0ea53e --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..b8edca96f4 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..eb84e88ae7 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js index 35b58661cf..356e56fb90 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static m() { return 42; } 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; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js index 4d9376e51b..c85aa20561 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..66809e3421 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js index a4df060683..22a94cf276 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..9692e0802a --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..a3fe6c07f3 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js index 75fffcc2fd..9fac777757 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js index 222e3c3d0c..a9a98342b1 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js index 59fd93d265..eb9906bb7e 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js index 7520e6546f..c7f58fca98 100644 --- a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js index 75612496c5..4d75ecdde5 100644 --- a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js @@ -9,7 +9,7 @@ flags: [generated] info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js index c5f63012a8..808c80f674 100644 --- a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js index ca04c448dc..88c47f2c7e 100644 --- a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperProperty. diff --git a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js index 7ee11c41d4..a8375776ce 100644 --- a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js index 9de84949fd..586a59e3b0 100644 --- a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js @@ -9,7 +9,7 @@ flags: [generated] info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js index 1ba08ba625..d4999d75df 100644 --- a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js index c2520d7416..ddeafb7253 100644 --- a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperProperty. diff --git a/test/language/statements/class/fields-direct-eval-err-contains-newtarget.js b/test/language/statements/class/fields-direct-eval-err-contains-newtarget.js index d0768c666d..b634e68664 100644 --- a/test/language/statements/class/fields-direct-eval-err-contains-newtarget.js +++ b/test/language/statements/class/fields-direct-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Functions These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains NewTarget. diff --git a/test/language/statements/class/fields-indirect-eval-err-contains-newtarget.js b/test/language/statements/class/fields-indirect-eval-err-contains-newtarget.js index 3296a5902e..0bccd2bc43 100644 --- a/test/language/statements/class/fields-indirect-eval-err-contains-newtarget.js +++ b/test/language/statements/class/fields-indirect-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Functions These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains NewTarget. diff --git a/test/language/statements/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js index e749c637b5..ff9937bd55 100644 --- a/test/language/statements/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-field-identifier-initializer.js b/test/language/statements/class/fields-multiple-definitions-rs-field-identifier-initializer.js index 687a0e89b5..94be02f9f3 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-field-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-field-identifier.js index 90f5beeac8..5cec156761 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-field-identifier.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-alt.js index 2ff87867ef..62a36300c3 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js index 6f79a3983d..f427a32a6f 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js index 2d0407dcc9..71c7dcaedb 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier.js index 83e1449291..938faa6334 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..688ee936d3 --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,167 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..d124b7bb70 --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,168 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + m2() { return 39 } + bar = "barbaz"; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..b52b87c40d --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,167 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..74e830b358 --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,168 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..b5dad58cf6 --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,156 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + } + m2() { return 39 } + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..65606f3995 --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,157 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + m2() { return 39 } + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js index bcfb8748ea..39e4a7ef52 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple fields definitions) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -61,27 +61,21 @@ class C { foo = "foobar"; m() { return 42 } 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; } m2() { return 39 } diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js index 09478b3851..e0c00429ed 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple fields definitions) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..1f29e1ab8d --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,142 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J + m2() { return 39 } + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js index dfdd73f063..b544a1c60c 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..e0e4a8f7a0 --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,142 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + m2() { return 39 } + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..817bcbeb8c --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1 + m2() { return 39 } + bar = "barbaz"; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js index bca1831262..1ac713647c 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js index c21ea4bfe3..a0002bd89b 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier.js index 00fd6c1921..5648b487ea 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js index 22fa2b0da1..e3f03241c6 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js index 76c04b7d49..1e42a966f2 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier.js index e247070e43..ac5a0d4f62 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js index aa000ad656..400e5d122a 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js index ab1bb85ab4..2c29899a91 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js index bae395d9ac..d6cde65650 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js index 272bc0f863..0cc988d492 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..09ade3dbfc --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,145 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..356fd53748 --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,146 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + foo = "foobar" + bar = "barbaz"; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..d1b3bc5e5b --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,145 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..2f730082f1 --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,146 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..a12442c283 --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + } + foo = "foobar" + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..346e65cdcf --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + foo = "foobar" + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js index ef23039467..ad1c524bc2 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple stacked fields definitions through ASI) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { 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; } foo = "foobar" diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js index 93d348a85a..22ce49c276 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple stacked fields definitions through ASI) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..d91358809b --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J + foo = "foobar" + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js index 9342cb0df3..81667e7b9a 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..0323d1ba9f --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + foo = "foobar" + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..00195547ae --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,114 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1 + foo = "foobar" + bar = "barbaz"; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js index 13c7d5b6ad..85c20cf305 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js index 298fcd3813..1adf864b9c 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js index 216abbc8b8..44ef30e084 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 9c0ac0843a..4925722e93 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js index 360326b4af..336fe868c2 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier.js index 119e961590..05eb5931be 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js index 7d2e2a20ab..ae4ead1bee 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js index 5f3108daea..a1ad8147cb 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js index b379b24f68..e5f0a53435 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier.js index bd161b009e..481fc5a891 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..605fb4537e --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + } + m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..239d4919c1 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..cb354f463c --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + } + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..b259234b52 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..7239d18edc --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + } + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..bca48ba4d3 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js index def9522ced..5220efc71a 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line without a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { 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; } m() { return 42; } diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js index bf2d74877f..2fe934206a 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line without a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..d27341dd51 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js index ef29d93d2f..a93c8ded30 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..162255ce39 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..22b4b6fbee --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1 + m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js index 5dffc941b5..0df69cf6d5 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js index d0d2db69d9..d5050f0a43 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js index 002c1424d0..416caf6200 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index 98b45a5a8f..8c6791490b 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js index 467ee066d3..45af15f7ad 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier.js index e61355b381..c60648fb25 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js index b5a7337abc..f32323d0e2 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js index a2302883ff..28e4c9228b 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js index c5841d293e..37dae23239 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier.js index 07e31b0595..e2ae88a41c 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..e078209aa4 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + *m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..12b2d42c5e --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + *m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..6dfdfb9909 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..d779f84a50 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..c52d4f24fa --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..1f5549752a --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js index 09243ce857..cea6b52d28 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { 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; }; *m() { return 42; } diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js index 037f0af699..7792dae9fd 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..4d5c49496d --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js index de4903af25..d1f86032cf 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..034439b2c7 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..82e426f573 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + *m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js index 022c50d953..791b9e1788 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js index a0d77cef6b..841cf473fe 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js index 2082647210..f9704b0063 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 619efe11e3..d272ebd40c 100644 --- a/test/language/statements/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier-initializer.js index 2b98490a54..95406886db 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier.js index 77075206b3..46d3ad2a29 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js index 781cc7baa0..9b2a0a5bc9 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js index a68c9c672b..5778a7e7fe 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js index 0be603cf23..522c5b447c 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier.js index 77965045d0..bebf9ffcbd 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..3b129d8707 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..deac127cb8 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..ec00e6e04e --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..beb4f5bd90 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..00afe0eeb1 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..f1563bbf98 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js index aef53585d1..17d00c2832 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { 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; }; m() { return 42; } diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js index d5b6f83f37..fc1c9d27ee 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..8179a2faa1 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js index a220ddb736..edbabcddca 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..a341b4c725 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..f24913feba --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js index 32f572cf7e..bbdadd514d 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js index ddfc226c3c..cb3d1d82fb 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier.js index e6d17b1502..1e5bf716f5 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-private-direct-eval-err-contains-newtarget.js b/test/language/statements/class/fields-private-direct-eval-err-contains-newtarget.js index d44434ad17..aa430ae65a 100644 --- a/test/language/statements/class/fields-private-direct-eval-err-contains-newtarget.js +++ b/test/language/statements/class/fields-private-direct-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Functions These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains NewTarget. diff --git a/test/language/statements/class/fields-private-indirect-eval-err-contains-newtarget.js b/test/language/statements/class/fields-private-indirect-eval-err-contains-newtarget.js index c15dd203a9..cdae3ddf4b 100644 --- a/test/language/statements/class/fields-private-indirect-eval-err-contains-newtarget.js +++ b/test/language/statements/class/fields-private-indirect-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ info: | Additional Early Error Rules for Eval Outside Functions These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains NewTarget. diff --git a/test/language/statements/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js index 3b6200a167..dcc303059c 100644 --- a/test/language/statements/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-field-identifier-initializer.js b/test/language/statements/class/fields-regular-definitions-rs-field-identifier-initializer.js index 6439266ac6..1f1c3bf839 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-regular-definitions-rs-field-identifier-initializer.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-field-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-field-identifier.js index 719660f778..5b8c7588e1 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-field-identifier.js +++ b/test/language/statements/class/fields-regular-definitions-rs-field-identifier.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-alt.js index 8d063826b9..1fc3b02433 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js index 9e7e93dc4a..73a5c7a433 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer.js index b943795c9e..0a80f05c5c 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier.js index 0f123c614f..edbc1f65cf 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..4ca3001048 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..4d384515f0 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..d7f37d5db9 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..6da17cffe5 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..87235f63cb --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..f2444b4a57 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js index f32831af59..20c0bcb0d7 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (regular fields defintion) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -58,27 +58,21 @@ info: | class C { 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; } static $(value) { diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier.js index f825b5cd62..f55b60533c 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (regular fields defintion) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..bf23ca52cf --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,95 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +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 + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js index a0834c7e2c..568f333fda 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..8874f71243 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,95 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +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); + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..f459ce5a89 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,89 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1 + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +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); + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js index d53d2260f5..546b552552 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js index 169139c146..d1a39b71b7 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier.js index 9fe26d29d5..6813941f1e 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js index 684c6cde62..6bd67d046c 100644 --- a/test/language/statements/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier-initializer.js index 96d9b0a9cd..6906aadfa1 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier.js index 45fb9c76a7..8db7ab527c 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js index 01b1b15be3..316381c808 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js index 1d3fef8e89..a2d85fa476 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js index fe793e6a42..71ad00009a 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier.js index 01b1418205..992843e45c 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..263742e08c --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..c63da90036 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..d5b17a2aa2 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..448e95ffdf --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..8557f9e155 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..2310df37d4 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,125 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js index 95282d0a0f..3a5dbc94e5 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { async *m() { return 42; } 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; }; static $(value) { diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js index 63d11f1ee3..34822c8641 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..ff06256006 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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 + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js index 6649adc942..5c9a05df8e 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..64fa0b3f17 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..832d2cfc79 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,104 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js index 38a850f4ad..15d9c9b353 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js index 15731e6585..c5b703caea 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier.js index 4ee4955df7..2c2149d586 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js index 1ee7dd8fd3..b1a083f770 100644 --- a/test/language/statements/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-method-rs-field-identifier-initializer.js index 292a5c4b39..e1b07b248c 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-field-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-field-identifier.js index fd0af86be3..9ab607ddbf 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-alt.js index 88897a8a75..a0819035aa 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js index bc7ec4d60f..79ade95804 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js index d695c6068d..35db4d8d0a 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier.js index d4c78171b2..0ff930c120 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..1807d1e71c --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..1d10947d30 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..bf618bbd90 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..021a6ac3a5 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..f20de2c3e5 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..f6815bb66a --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js index 1e8d884956..ce2eda176b 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { async m() { return 42; } 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; }; static $(value) { diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js index 4689824b50..2ab524d63c 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..b24220655b --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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 + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js index 874375753a..582e865cd8 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..f5b8fc84c5 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..ea9823cf4b --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,103 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +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); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js index a6a4e362c6..ae9e7f7b81 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js index fb5b87f15c..69aa0a43fc 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier.js index 723f1ab635..0508e4fc0e 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index 8a26a88ca0..4cb919e79d 100644 --- a/test/language/statements/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-same-line-gen-rs-field-identifier-initializer.js index 730cf1ab8f..426c82042a 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-field-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-field-identifier.js index bbb8c36526..99711c1081 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-same-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-alt.js index 5f6cdf2a78..46ed8603b4 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js index ca55902848..02c4fd5744 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer.js index eb13a59e9a..1f9775cb93 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier.js index ebf2311b1c..b8ae2860f9 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..34c52e35be --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; *m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..d1bf17f7d0 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; *m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..6c644a85a8 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..b292987488 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..96c7fd2324 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..7487f8a298 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js index 16754b1bab..bb74a09ac4 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a generator method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { 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; }; *m() { return 42; } static $(value) { diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier.js index aef62fd988..ba3900d6ca 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a generator method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..aa08600a95 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js index 3180736ccc..773fb6878b 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..b69d69738d --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..966b29a569 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; *m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js index ef96d042d7..25035ef464 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js index 460d9d2caf..39cb60711c 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier.js index a217c90f53..7fcc9f4b0d 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 2d4adbcbf6..d777013583 100644 --- a/test/language/statements/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-same-line-method-rs-field-identifier-initializer.js index 6da87a0772..4071d75c24 100644 --- a/test/language/statements/class/fields-same-line-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-field-identifier.js b/test/language/statements/class/fields-same-line-method-rs-field-identifier.js index 532cf1574d..be04a97680 100644 --- a/test/language/statements/class/fields-same-line-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-same-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-alt.js index 5b8e75fe25..bf0fd0ebbc 100644 --- a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js index d5cab7a721..4782feedb8 100644 --- a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer.js index 99a60d4a1d..f829de55ad 100644 --- a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier.js index 0476a72839..e9685f8ddd 100644 --- a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..283f4bb57c --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + }; m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..9852b31b81 --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..04e0616d3a --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + }; m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..8931afd3cd --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..4db8cae136 --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + }; m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..d69787b1dd --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js index da60f6ade0..6015f117ee 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { 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; }; m() { return 42; } static $(value) { diff --git a/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier.js index 2a8e5726c2..1ec92a2cef 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..1be9cfa4cb --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J; m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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 + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt.js index c50fc6c5c7..ad9fc5fe32 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..f1c49c6b4e --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..18cd2ac394 --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +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 + + + 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". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1; m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +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); + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js index c840d5639d..d419e8f129 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js index 5bdd621782..0192cf9b07 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier.js index 27d499712f..3ffe384b22 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js index b4b458afbb..4a417ea30a 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js b/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js index 0b36001dc4..bf235849d0 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier.js index 9ed86d6da1..f146e6d7fb 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js index c0d6bb22dd..d261e10ee5 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js index 63f406d8f5..6b409945c1 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js index 6803fd8731..0ef95fe37d 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier.js index d6d84e59db..c7463d4662 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..b9c70eec7f --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + ;;;; + ;;;;;;static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_‍_J(value) { + yield await value; + };;;;;;; + ;;;; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..4955ed2681 --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + ;;;; + ;;;;;;static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + };;;;;;; + ;;;; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..17664b86be --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static AsyncMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + ;;;; + ;;;;;;static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_‍_J(value) { + return await value; + };;;;;;; + ;;;; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‍_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000..b8905eb225 --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static AsyncMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + ;;;; + ;;;;;;static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + };;;;;;; + ;;;; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000..6f6590341d --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,111 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static GeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + ;;;; + ;;;;;;static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_‍_J(value) { + yield value; + };;;;;;; + ;;;; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‍_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_‍_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000..864a3b405b --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,112 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static GeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + + + 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". + +---*/ + + +class C { + ;;;; + ;;;;;;static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + };;;;;;; + ;;;; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js index 16561b43e5..ae1fa76933 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (fields definition wrapped in semicolons) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { ;;;; ;;;;;;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; };;;;;;; ;;;; diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js index 8801041a42..1b96159f87 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (fields definition wrapped in semicolons) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000..5c18c011d3 --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,97 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +class C { + ;;;; + ;;;;;;static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_‍_J;;;;;;; + ;;;; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‍_J = value; + return C.#ZW_‍_J; + } +} + +var c = new C(); + +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 + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js index b17e1c0926..7c839f76e6 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000..16b297b283 --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,97 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +class C { + ;;;; + ;;;;;;static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;;;;;;; + ;;;; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +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); + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000..3cfe37c481 --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,91 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +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 + + + 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". + +---*/ + + +class C { + ;;;; + ;;;;;;static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_‍_J = 1;;;;;;; + ;;;; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_‍_J() { + return C.#ZW_‍_J; + } +} + +var c = new C(); + +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); + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js index a680c61c5c..98d9d89dae 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js index 93b92daff4..e11da6abc2 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js index 4725ed7115..6a2ace3c27 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/static-private-fields-proxy-default-handler-throws.js b/test/language/statements/class/static-private-fields-proxy-default-handler-throws.js new file mode 100644 index 0000000000..137797ec85 --- /dev/null +++ b/test/language/statements/class/static-private-fields-proxy-default-handler-throws.js @@ -0,0 +1,28 @@ +// Copyright (C) 2018 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-privatefieldget +description: Static private fields not accessible via default Proxy handler +info: | + 1. Assert: P is a Private Name value. + 2. If O is not an object, throw a TypeError exception. + 3. Let entry be PrivateFieldFind(P, O). + 4. If entry is empty, throw a TypeError exception. + +features: [class, class-static-fields-private] +---*/ + +class C { + static #x = 1; + static x() { + return this.#x; + } +} + +var P = new Proxy(C, {}); + +assert.sameValue(C.x(), 1); +assert.throws(TypeError, function() { + P.x(); +}); diff --git a/test/language/statements/class/syntax-error-grammar-field-def-has-initializer-no-sc.js b/test/language/statements/class/syntax-error-grammar-field-def-has-initializer-no-sc.js deleted file mode 100644 index 4dfed1839e..0000000000 --- a/test/language/statements/class/syntax-error-grammar-field-def-has-initializer-no-sc.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-field-def-has-initializer-no-sc.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - x = [] -} diff --git a/test/language/statements/class/syntax-error-grammar-field-no-initializer-with-method.js b/test/language/statements/class/syntax-error-grammar-field-no-initializer-with-method.js deleted file mode 100644 index d4991c69f1..0000000000 --- a/test/language/statements/class/syntax-error-grammar-field-no-initializer-with-method.js +++ /dev/null @@ -1,32 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-field-no-initializer-with-method.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - x - m() {} -} diff --git a/test/language/statements/class/syntax-error-grammar-fields.js b/test/language/statements/class/syntax-error-grammar-fields.js deleted file mode 100644 index 7b0527c42f..0000000000 --- a/test/language/statements/class/syntax-error-grammar-fields.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-fields.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-public, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - x y -} diff --git a/test/language/statements/class/syntax-error-grammar-privatename-no-initializer-with-method.js b/test/language/statements/class/syntax-error-grammar-privatename-no-initializer-with-method.js deleted file mode 100644 index 1014356e35..0000000000 --- a/test/language/statements/class/syntax-error-grammar-privatename-no-initializer-with-method.js +++ /dev/null @@ -1,35 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-no-initializer-with-method.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - #x - m() {} -} diff --git a/test/language/statements/class/syntax-error-grammar-privatename.js b/test/language/statements/class/syntax-error-grammar-privatename.js deleted file mode 100644 index e92dadf3ac..0000000000 --- a/test/language/statements/class/syntax-error-grammar-privatename.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - # x -} diff --git a/test/language/statements/class/syntax-error-grammar-privatenames.js b/test/language/statements/class/syntax-error-grammar-privatenames.js deleted file mode 100644 index 503031c6bd..0000000000 --- a/test/language/statements/class/syntax-error-grammar-privatenames.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatenames.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - #x #y -} diff --git a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js index f0a7779408..80c3f60e82 100644 --- a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-ues-error.case // - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js index 5bc7632b4d..dfc24344fd 100644 --- a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-zwj-error.case // - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js index 638f1ca522..13c9558d65 100644 --- a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-zwnj-error.case // - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-error.js b/test/language/statements/class/syntax-invalid-grammar-privatename-error.js index 7ddf739086..e7393680a5 100644 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-privatename-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-privatename-error.case // - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template /*--- -description: SyntaxError (class declaration) +description: No space allowed between sigial and IdentifierName (class declaration) esid: prod-ClassElement features: [class-fields-private, class] flags: [generated] @@ -24,7 +24,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js index 95e59adab0..03f54da912 100644 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js +++ b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js index 052e5c8493..5f707a61b4 100644 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js index accdca3be8..6d56613aed 100644 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js deleted file mode 100644 index 01562653b4..0000000000 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js +++ /dev/null @@ -1,65 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-identifier-non-id-start-error.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: Valid PrivateName Syntax (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -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 - - - 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". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - #\u{00}; -} diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js deleted file mode 100644 index 5dfa380f04..0000000000 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js +++ /dev/null @@ -1,65 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-identifier-non-ues-error.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: Valid PrivateName Syntax (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -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 - - - 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". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - #\u0000; -} diff --git a/test/language/statements/class/syntax-invalid-grammar-privatenames-same-line-error.js b/test/language/statements/class/syntax-invalid-grammar-privatenames-same-line-error.js index c76d611923..b85fab1969 100644 --- a/test/language/statements/class/syntax-invalid-grammar-privatenames-same-line-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-privatenames-same-line-error.js @@ -24,7 +24,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer-alt.js b/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer-alt.js index dc2cccaed3..437af898dc 100644 --- a/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer-alt.js +++ b/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer-alt.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer.js b/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer.js index 843cd646de..04b8fc12d9 100644 --- a/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer.js +++ b/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-valid-grammar-field-identifier-alt.js b/test/language/statements/class/syntax-valid-grammar-field-identifier-alt.js index 23bc067205..fdbab337df 100644 --- a/test/language/statements/class/syntax-valid-grammar-field-identifier-alt.js +++ b/test/language/statements/class/syntax-valid-grammar-field-identifier-alt.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-valid-grammar-field-identifier.js b/test/language/statements/class/syntax-valid-grammar-field-identifier.js index 6100975d82..f7ec447dbb 100644 --- a/test/language/statements/class/syntax-valid-grammar-field-identifier.js +++ b/test/language/statements/class/syntax-valid-grammar-field-identifier.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-valid-grammar-fields-multi-line.js b/test/language/statements/class/syntax-valid-grammar-fields-multi-line.js index cb260398d5..61717ccc7e 100644 --- a/test/language/statements/class/syntax-valid-grammar-fields-multi-line.js +++ b/test/language/statements/class/syntax-valid-grammar-fields-multi-line.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-fields-multi-line.case // - src/class-fields/syntax/valid/cls-decl-fields-valid-syntax.template /*--- -description: SyntaxError (class declaration) +description: Valid multi-line, multi-field (class declaration) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] diff --git a/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js b/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js index 76f969b204..221df0069c 100644 --- a/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js +++ b/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js @@ -21,26 +21,26 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName Initializer : = AssignmentExpression - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer.js b/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer.js index 3f97f1e0a3..4c0e2d3b99 100644 --- a/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer.js +++ b/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer.js @@ -21,26 +21,26 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName Initializer : = AssignmentExpression - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-valid-grammar-privatename-identifier.js b/test/language/statements/class/syntax-valid-grammar-privatename-identifier.js index dfe6c3703c..39ba28c386 100644 --- a/test/language/statements/class/syntax-valid-grammar-privatename-identifier.js +++ b/test/language/statements/class/syntax-valid-grammar-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-valid-grammar-privatename-no-initializer-with-method.js b/test/language/statements/class/syntax-valid-grammar-privatename-no-initializer-with-method.js index 93b9728f6c..0c00168f84 100644 --- a/test/language/statements/class/syntax-valid-grammar-privatename-no-initializer-with-method.js +++ b/test/language/statements/class/syntax-valid-grammar-privatename-no-initializer-with-method.js @@ -21,7 +21,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/statements/class/syntax-valid-grammar-privatenames-multi-line.js b/test/language/statements/class/syntax-valid-grammar-privatenames-multi-line.js index 0bef1fab1a..816f519ee6 100644 --- a/test/language/statements/class/syntax-valid-grammar-privatenames-multi-line.js +++ b/test/language/statements/class/syntax-valid-grammar-privatenames-multi-line.js @@ -21,7 +21,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/