File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1142,6 +1142,7 @@ void mark_java_implicitly_generic_class_type(
1142
1142
{
1143
1143
const std::string qualified_class_name = " java::" + id2string (class_name);
1144
1144
PRECONDITION (symbol_table.has_symbol (qualified_class_name));
1145
+ // This will have its type changed
1145
1146
symbolt &class_symbol = symbol_table.get_writeable_ref (qualified_class_name);
1146
1147
const java_class_typet &class_type = to_java_class_type (class_symbol.type );
1147
1148
@@ -1197,19 +1198,21 @@ void mark_java_implicitly_generic_class_type(
1197
1198
// implicitly generic and update identifiers of type parameters used in fields
1198
1199
if (!implicit_generic_type_parameters.empty ())
1199
1200
{
1200
- class_symbol. type = java_implicitly_generic_class_typet (
1201
+ java_implicitly_generic_class_typet new_class_type (
1201
1202
class_type, implicit_generic_type_parameters);
1202
1203
1203
- for (auto &field : class_type .components ())
1204
+ for (auto &field : new_class_type .components ())
1204
1205
{
1205
1206
find_and_replace_parameters (
1206
1207
field.type (), implicit_generic_type_parameters);
1207
1208
}
1208
1209
1209
- for (auto &base : class_type .bases ())
1210
+ for (auto &base : new_class_type .bases ())
1210
1211
{
1211
1212
find_and_replace_parameters (
1212
1213
base.type (), implicit_generic_type_parameters);
1213
1214
}
1215
+
1216
+ class_symbol.type = new_class_type;
1214
1217
}
1215
1218
}
You can’t perform that action at this time.
0 commit comments