File tree 1 file changed +10
-3
lines changed 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -768,9 +768,16 @@ void java_bytecode_convert_methodt::setup_local_variables(
768
768
<< " name " << v.var .name << " v.var.descriptor '"
769
769
<< v.var .descriptor << " ' holes " << v.holes .size () << eom;
770
770
#endif
771
- typet t;
772
- // TODO: might need changing once descriptor/signature issue is resolved
773
- t=java_type_from_string (v.var .descriptor );
771
+
772
+ const std::string method_name = id2string (method_id);
773
+ const size_t method_name_end = method_name.rfind (" :(" );
774
+ const size_t class_name_end = method_name.rfind (' .' , method_name_end);
775
+ const std::string class_name = method_name.substr (0 , class_name_end);
776
+
777
+ const typet t = v.var .signature .has_value ()
778
+ ? java_type_from_string_with_exception (
779
+ v.var .descriptor , v.var .signature , class_name)
780
+ : java_type_from_string (v.var .descriptor );
774
781
775
782
std::ostringstream id_oss;
776
783
id_oss << method_id << " ::" << v.var .start_pc << " ::" << v.var .name ;
You can’t perform that action at this time.
0 commit comments