mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:07:35 +00:00
LibJS/Bytecode: Don't choke on MemberExpression with PrivateIdentifier
This commit is contained in:
parent
d063f35afd
commit
8a3e350321
2 changed files with 8 additions and 1 deletions
|
@ -3289,6 +3289,8 @@ DeprecatedString MemberExpression::to_string_approximation() const
|
|||
object_string = static_cast<Identifier const&>(*m_object).string();
|
||||
if (is_computed())
|
||||
return DeprecatedString::formatted("{}[<computed>]", object_string);
|
||||
if (is<PrivateIdentifier>(*m_property))
|
||||
return DeprecatedString::formatted("{}.{}", object_string, verify_cast<PrivateIdentifier>(*m_property).string());
|
||||
return DeprecatedString::formatted("{}.{}", object_string, verify_cast<Identifier>(*m_property).string());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue