Skip to content

Commit 6bea98a

Browse files
committed
Avoid shadowing "class_symbol"
Just move it to the only case that actually uses it, and also remove an unused local variable - just keep the function call.
1 parent 75216f4 commit 6bea98a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

jbmc/unit/java_bytecode/java_bytecode_parse_generics/parse_bounded_generic_inner_classes.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ SCENARIO(
2121
std::string class_prefix = "java::BoundedGenericInnerClasses";
2222
REQUIRE(new_symbol_table.has_symbol(class_prefix));
2323

24-
const symbolt &class_symbol = new_symbol_table.lookup_ref(class_prefix);
25-
const java_class_typet &java_class_type =
26-
require_type::require_complete_java_non_generic_class(class_symbol.type);
27-
2824
WHEN("Parsing an inner class with type variable")
2925
{
3026
std::string inner_name = class_prefix + "$Inner";
@@ -92,6 +88,8 @@ SCENARIO(
9288

9389
WHEN("There is a generic field with a concrete type")
9490
{
91+
const symbolt &class_symbol = new_symbol_table.lookup_ref(class_prefix);
92+
require_type::require_complete_java_non_generic_class(class_symbol.type);
9593
const struct_union_typet::componentt &belem_type =
9694
require_type::require_component(
9795
to_struct_type(class_symbol.type), "belem");

0 commit comments

Comments
 (0)