Skip to content

Commit

Permalink
Implement symbol.prototype[ @@ToStringTag] (#1292)
Browse files Browse the repository at this point in the history
* Fixed hypot length bug

* added the symbol.prototype[ @@ToStringTag]

* use Self::NAME
  • Loading branch information
moadmmh authored May 29, 2021
1 parent e7ffe7f commit c6d5689
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion boa/src/builtins/symbol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl BuiltIn for Symbol {
.static_property("species", symbol_species, attribute)
.static_property("split", symbol_split, attribute)
.static_property("toPrimitive", symbol_to_primitive, attribute)
.static_property("toStringTag", symbol_to_string_tag, attribute)
.static_property("toStringTag", symbol_to_string_tag.clone(), attribute)
.static_property("unscopables", symbol_unscopables, attribute)
.method(Self::to_string, "toString", 0)
.accessor(
Expand All @@ -91,6 +91,11 @@ impl BuiltIn for Symbol {
)
.callable(true)
.constructable(false)
.property(
symbol_to_string_tag,
Self::NAME,
Attribute::READONLY | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE,
)
.build();

(Self::NAME, symbol_object.into(), Self::attribute())
Expand Down

0 comments on commit c6d5689

Please sign in to comment.