Skip to content

Commit cf85073

Browse files
committed
Java object factory: create initialiser using exact LHS type
Previously the initialiser could have a followed (e.g. struct) type, while the LHS being set up could have a tag type.
1 parent 85a2a6a commit cf85073

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jbmc/src/java_bytecode/java_object_factory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ void java_object_factoryt::gen_nondet_struct_init(
890890

891891
// This code mirrors the `remove_java_new` pass:
892892
auto initial_object =
893-
zero_initializer(struct_type, source_locationt(), ns);
893+
zero_initializer(expr.type(), source_locationt(), ns);
894894
CHECK_RETURN(initial_object.has_value());
895895
const irep_idt qualified_clsid = "java::" + id2string(class_identifier);
896896
set_class_identifier(

0 commit comments

Comments
 (0)