tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

new-no-sc-line-method-rs-private-setter.js (2842B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/class-elements/rs-private-setter.case
      3 // - src/class-elements/productions/cls-expr-new-no-sc-line-method.template
      4 /*---
      5 description: Valid PrivateName as private setter (field definitions followed by a method in a new line without a semicolon)
      6 esid: prod-FieldDefinition
      7 features: [class-methods-private, class-fields-private, class, class-fields-public]
      8 flags: [generated]
      9 includes: [propertyHelper.js]
     10 info: |
     11    ClassElement :
     12      MethodDefinition
     13      ...
     14      ;
     15 
     16    MethodDefinition :
     17      ...
     18      set ClassElementName ( PropertySetParameterList ) { FunctionBody }
     19 
     20    ClassElementName :
     21      PropertyName
     22      PrivateName
     23 
     24    PrivateName ::
     25      # IdentifierName
     26 
     27    IdentifierName ::
     28      IdentifierStart
     29      IdentifierName IdentifierPart
     30 
     31    IdentifierStart ::
     32      UnicodeIDStart
     33      $
     34      _
     35      \ UnicodeEscapeSequence
     36 
     37    IdentifierPart::
     38      UnicodeIDContinue
     39      $
     40      \ UnicodeEscapeSequence
     41      <ZWNJ> <ZWJ>
     42 
     43    UnicodeIDStart::
     44      any Unicode code point with the Unicode property "ID_Start"
     45 
     46    UnicodeIDContinue::
     47      any Unicode code point with the Unicode property "ID_Continue"
     48 
     49    NOTE 3
     50    The sets of code points with Unicode properties "ID_Start" and
     51    "ID_Continue" include, respectively, the code points with Unicode
     52    properties "Other_ID_Start" and "Other_ID_Continue".
     53 
     54 ---*/
     55 
     56 
     57 var C = class {
     58  #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
     59  set #$(value) {
     60    this.#$_ = value;
     61  }
     62  set #_(value) {
     63    this.#__ = value;
     64  }
     65  set #\u{6F}(value) {
     66    this.#\u{6F}_ = value;
     67  }
     68  set #\u2118(value) {
     69    this.#\u2118_ = value;
     70  }
     71  set #ZW_\u200C_NJ(value) {
     72    this.#ZW_\u200C_NJ_ = value;
     73  }
     74  set #ZW_\u200D_J(value) {
     75    this.#ZW_\u200D_J_ = value;
     76  }
     77 
     78  m() { return 42; }
     79  $(value) {
     80    this.#$ = value;
     81    return this.#$_;
     82  }
     83  _(value) {
     84    this.#_ = value;
     85    return this.#__;
     86  }
     87  \u{6F}(value) {
     88    this.#\u{6F} = value;
     89    return this.#\u{6F}_;
     90  }
     91  \u2118(value) {
     92    this.#\u2118 = value;
     93    return this.#\u2118_;
     94  }
     95  ZW_\u200C_NJ(value) {
     96    this.#ZW_\u200C_NJ = value;
     97    return this.#ZW_\u200C_NJ_;
     98  }
     99  ZW_\u200D_J(value) {
    100    this.#ZW_\u200D_J = value;
    101    return this.#ZW_\u200D_J_;
    102  }
    103 
    104 }
    105 
    106 var c = new C();
    107 
    108 assert.sameValue(c.m(), 42);
    109 assert.sameValue(c.m, C.prototype.m);
    110 assert(
    111  !Object.prototype.hasOwnProperty.call(c, "m"),
    112  "m doesn't appear as an own property on the C instance"
    113 );
    114 
    115 verifyProperty(C.prototype, "m", {
    116  enumerable: false,
    117  configurable: true,
    118  writable: true,
    119 });
    120 
    121 assert.sameValue(c.$(1), 1);
    122 assert.sameValue(c._(1), 1);
    123 assert.sameValue(c.\u{6F}(1), 1);
    124 assert.sameValue(c.\u2118(1), 1);
    125 assert.sameValue(c.ZW_\u200C_NJ(1), 1);
    126 assert.sameValue(c.ZW_\u200D_J(1), 1);
    127 
    128 reportCompare(0, 0);