Global Metrics

path: .metrics.loc.lloc
old: 33.0
new: 37.0

path: .metrics.halstead.effort
old: 23945.01825686324
new: 23410.939738557165

path: .metrics.halstead.N2
old: 78.0
new: 81.0

path: .metrics.halstead.time
old: 1330.2787920479575
new: 1300.6077632531758

path: .metrics.halstead.estimated_program_length
old: 135.25821588700785
new: 147.06147499796518

path: .metrics.halstead.bugs
old: 0.2769207677173523
new: 0.272787611584997

path: .metrics.halstead.volume
old: 1074.4559474233506
new: 1107.9251316601128

path: .metrics.halstead.difficulty
old: 22.285714285714285
new: 21.130434782608695

path: .metrics.halstead.level
old: 0.04487179487179487
new: 0.04732510288065843

path: .metrics.halstead.length
old: 213.0
new: 216.0

path: .metrics.halstead.vocabulary
old: 33.0
new: 35.0

path: .metrics.halstead.purity_ratio
old: 0.6350150980610697
new: 0.6808401620276165

path: .metrics.halstead.n2
old: 21.0
new: 23.0

path: .metrics.nexits.sum
old: 7.0
new: 6.0

path: .metrics.mi.mi_original
old: 56.28885091439986
new: 56.129343112501004

path: .metrics.mi.mi_visual_studio
old: 32.91745667508764
new: 32.824177258772515

path: .metrics.mi.mi_sei
old: 50.46695603934475
new: 50.236834924562146

Code

// |reftest| shell-option(--enable-private-methods) skip-if(!xulRuntime.shell) -- requires shell-options
// This file was procedurally generated from the following sources:
// - src/class-elements/rs-static-generator-method-privatename-identifier-alt.case
// - src/class-elements/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 get $() {
    return this.#$;
  }
  static get _() {
    return this.#_;
  }
  static get o() {
    return this.#o;
  }
  static get ℘() { // DO NOT CHANGE THE NAME OF THIS FIELD
    return this.#℘;
  }
  static get ZW_‌_NJ() { // DO NOT CHANGE THE NAME OF THIS FIELD
    return this.#ZW_‌_NJ;
  }
  static get ZW_‍_J() { // DO NOT CHANGE THE NAME OF THIS FIELD
    return this.#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]).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);

reportCompare(0, 0);