We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b8583d commit e936a29Copy full SHA for e936a29
src/java_bytecode/java_types.h
@@ -611,10 +611,12 @@ class java_generic_symbol_typet : public symbol_typet
611
/// \return The index of the type in the vector of generic types.
612
optionalt<size_t> generic_type_index(const reference_typet &type) const
613
{
614
- const auto &type_pointer =
615
- std::find(generic_types().begin(), generic_types().end(), type);
616
- if(type_pointer != generic_types().end())
617
- return type_pointer - generic_types().begin();
+ const auto type_variables = type.find(ID_type_variables);
+ for(std::size_t i = 0; i < generic_types().size(); ++i)
+ {
+ if(type_variables == generic_types()[i].find(ID_type_variables))
618
+ return i;
619
+ }
620
return {};
621
}
622
};
0 commit comments