Skip to content

Commit adc72d1

Browse files
author
Matthias Güdemann
committed
Split add_array_type, specialize for enums
1 parent f7ba223 commit adc72d1

File tree

4 files changed

+218
-170
lines changed

4 files changed

+218
-170
lines changed

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,7 @@ void java_bytecode_convert_methodt::convert_invoke(
22382238
if(is_enum_values_clone_call)
22392239
{
22402240
const std::string clone_name =
2241-
"java::array[" + calling_class_name + "].clone:()Ljava/lang/Object;";
2241+
"java::array[" + class_type_name + "].clone:()Ljava/lang/Object;";
22422242
call.function() = symbol_exprt(clone_name, arg0.type());
22432243
}
22442244
else if(is_virtual)

jbmc/src/java_bytecode/java_bytecode_language.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,9 @@ bool java_bytecode_languaget::typecheck(
653653
}
654654
}
655655

656+
// Add array type clone specializations for enumerations
657+
add_java_enum_arrays(symbol_table);
658+
656659
// Now that all classes have been created in the symbol table we can populate
657660
// the class hierarchy:
658661
class_hierarchy(symbol_table);

0 commit comments

Comments
 (0)