Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions jbmc/src/java_bytecode/lambda_synthesis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,11 @@ static symbolt constructor_symbol(
id2string(constructor_name) + "::" + id2string(param_basename));
}

java_method_typet::parametert constructor_this_param;
java_method_typet::parametert constructor_this_param(
java_reference_type(struct_tag_typet(synthetic_class_name)));
constructor_this_param.set_this();
constructor_this_param.set_base_name("this");
constructor_this_param.set_identifier(id2string(constructor_name) + "::this");
constructor_this_param.type() =
java_reference_type(struct_tag_typet(synthetic_class_name));

constructor_type.parameters().insert(
constructor_type.parameters().begin(), constructor_this_param);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -929,13 +929,10 @@ TEST_CASE(
irep_idt method_identifier = "someClass.someMethod";

// The parameters should be already populated, but not have names, ids
code_typet::parametert this_param;
code_typet::parametert this_param(java_lang_object_type());
this_param.set_this();
this_param.type() = java_lang_object_type();
code_typet::parametert ref_to_inner;
ref_to_inner.type() = java_lang_object_type();
code_typet::parametert other_param;
other_param.type() = java_lang_object_type();
code_typet::parametert ref_to_inner(java_lang_object_type());
code_typet::parametert other_param(java_lang_object_type());
java_method_typet::parameterst parameters{
this_param, ref_to_inner, other_param};
for(const auto &param : parameters)
Expand Down Expand Up @@ -985,17 +982,14 @@ TEST_CASE(
// Arrange
const irep_idt method_id = "someClass.someMethod";
// The parameters should be already populated, with names, ids
code_typet::parametert this_param;
code_typet::parametert this_param(java_lang_object_type());
this_param.set_this();
this_param.type() = java_lang_object_type();
this_param.set_identifier(id2string(method_id) + "::this");
this_param.set_base_name("this");
code_typet::parametert ref_to_inner;
ref_to_inner.type() = java_lang_object_type();
code_typet::parametert ref_to_inner(java_lang_object_type());
ref_to_inner.set_identifier(id2string(method_id) + "::this$0");
ref_to_inner.set_base_name("this$0");
code_typet::parametert other_param;
other_param.type() = java_lang_object_type();
code_typet::parametert other_param(java_lang_object_type());
other_param.set_identifier(id2string(method_id) + "::other");
other_param.set_base_name("other");
java_method_typet::parameterst parameters{
Expand Down
5 changes: 0 additions & 5 deletions src/util/std_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -752,11 +752,6 @@ class code_typet:public typet
class parametert:public exprt
{
public:
DEPRECATED(SINCE(2018, 9, 21, "use parametert(type) instead"))
parametert():exprt(ID_parameter)
{
}

explicit parametert(const typet &type):exprt(ID_parameter, type)
{
}
Expand Down