diff --git a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp index ce4e52ed93..77dbf55537 100644 --- a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp +++ b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp @@ -2698,11 +2698,11 @@ static Bytecode::CodeGenerationErrorOr generate_optional_chain(Bytecode::G generator.emit(current_value_register); return {}; }, - [&](OptionalChain::PrivateMemberReference const&) -> Bytecode::CodeGenerationErrorOr { - return Bytecode::CodeGenerationError { - &optional_chain, - "Unimplemented reference: PrivateMemberReference"sv, - }; + [&](OptionalChain::PrivateMemberReference const& ref) -> Bytecode::CodeGenerationErrorOr { + generator.emit(current_base_register); + generator.emit(generator.intern_identifier(ref.private_identifier->string())); + generator.emit(current_value_register); + return {}; })); }