Skip to content

Commit 9fc5bfd

Browse files
author
thk123
committed
Removed impossible condition
Either an optional was returned or a correct lamdba so no need to handle the third case. Added an invariant to catch the case this changes.
1 parent adf6ec9 commit 9fc5bfd

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/java_bytecode/java_bytecode_parser.cpp

+3-8
Original file line numberDiff line numberDiff line change
@@ -1910,15 +1910,10 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
19101910
continue;
19111911
}
19121912

1913-
if(
1913+
// If parse_method_handle can't parse the lambda method, it should return {}
1914+
POSTCONDITION(
19141915
lambda_method_handle->handle_type !=
1915-
method_handle_typet::LAMBDA_METHOD_HANDLE)
1916-
{
1917-
lambda_method_handle->u2_values = std::move(u2_values);
1918-
error() << "ERROR: could not parse lambda function method handle"
1919-
<< eom;
1920-
continue;
1921-
}
1916+
method_handle_typet::LAMBDA_METHOD_HANDLE);
19221917

19231918
lambda_method_handle->interface_type =
19241919
pool_entry(interface_type_argument.ref1).s;

0 commit comments

Comments
 (0)