Skip to content

Commit

Permalink
Symbol.length is 0
Browse files Browse the repository at this point in the history
fixes #648
  • Loading branch information
rbri authored and gbrail committed May 19, 2020
1 parent 734db6e commit b8c7672
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/org/mozilla/javascript/NativeSymbol.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected void initPrototypeId(int id)
{
switch (id) {
case Id_constructor:
initPrototypeMethod(CLASS_NAME, id, "constructor", 1);
initPrototypeMethod(CLASS_NAME, id, "constructor", 0);
break;
case Id_toString:
initPrototypeMethod(CLASS_NAME, id, "toString", 0);
Expand Down
2 changes: 1 addition & 1 deletion testsrc/jstests/es6/symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ TestPrototype()


function TestConstructor() {
// Rhino assertEquals(0, Symbol.length);
assertEquals(0, Symbol.length);
assertSame(Function.prototype, Symbol.__proto__)
assertFalse(Object === Symbol.prototype.constructor)
assertFalse(Symbol === Object.prototype.constructor)
Expand Down
1 change: 0 additions & 1 deletion testsrc/test262.properties
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,6 @@ built-ins/Symbol
! species/subclassing.js
! prototype/Symbol.toPrimitive/name.js
! prototype/Symbol.toPrimitive/prop-desc.js
! Symbol/length.js
! this-val-non-obj.js

built-ins/ThrowTypeError
Expand Down

0 comments on commit b8c7672

Please sign in to comment.