Symbols cannot be defined as a property #732
Labels
bug
Something isn't working
E-Easy
Easy
good first issue
Good for newcomers
Hacktoberfest
Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com
Outputs:
Uncaught "TypeError": "can't convert symbol to string"
The problem starts here:
https://github.com/boa-dev/boa/blob/master/boa/src/builtins/object/mod.rs#L101 we try to coarce the key into a
string
type. We shouldn't need to do this as Property's already support Symbols as keys. We should pass the argument straight through to PropertyKey::from() and let it sort it out.PropertyKey is defined here:
https://github.com/boa-dev/boa/blob/master/boa/src/property/mod.rs#L290-L294
Contributing: https://github.com/boa-dev/boa/blob/master/CONTRIBUTING.md
Debugging: https://github.com/boa-dev/boa/blob/master/docs/debugging.md
The text was updated successfully, but these errors were encountered: