You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError when console.log a static property name in class #42773
Linux regseblaptop 5.4.0-107-generic #121-Ubuntu SMP Thu Mar 24 16:04:27 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
node -e "console.log(new class { static name = Symbol(); })"
How often does it reproduce? Is there a required condition?
The property must be static and called name.
What is the expected behavior?
{}
What do you see instead?
node:internal/util/inspect:684
return `${constructor}${size} `;
^
TypeError: Cannot convert a Symbol value to a string
at getPrefix (node:internal/util/inspect:684:3)
at getCtxStyle (node:internal/util/inspect:724:10)
at formatRaw (node:internal/util/inspect:1008:19)
at formatValue (node:internal/util/inspect:817:10)
at inspect (node:internal/util/inspect:347:10)
at formatWithOptionsInternal (node:internal/util/inspect:2167:40)
at formatWithOptions (node:internal/util/inspect:2029:10)
at console.value (node:internal/console/constructor:324:14)
at console.log (node:internal/console/constructor:360:61)
at [eval]:1:9
Activity
cola119 commentedon Apr 18, 2022
I'm working on this.
panva commentedon Jun 17, 2022
Resolved in 027c288