File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,11 @@ pointer_typet select_pointer_typet::specialize_generics(
9494 {
9595 return result.value ();
9696 }
97- throw " no infinite recursion" ;
97+ else
98+ {
99+ // return pointer type of generic parameter bound
100+ return java_reference_type (parameter.subtype ());
101+ }
98102 }
99103
100104 // generic parameters can be adopted from outer classes or superclasses so
@@ -204,9 +208,8 @@ optionalt<pointer_typet> select_pointer_typet::get_instantiated_type(
204208 const auto &replacements =
205209 generic_parameter_specialization_map.find (parameter_name)->second ;
206210
207- // max depth reached and nothing found, TODO return bound
208- if (replacements.size () <= depth)
209- return {};
211+ INVARIANT (
212+ depth < replacements.size (), " cannot access elements outside stack" );
210213
211214 // Check if there is a recursion loop, if yes return with nothing found
212215 if (visited.find (parameter_name) != visited.end ())
You can’t perform that action at this time.
0 commit comments