File tree 1 file changed +6
-11
lines changed 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -341,13 +341,13 @@ std::vector<typet> parse_list_types(
341
341
// / \param class_name_prefix: The name of the class to use to prefix any found
342
342
// / generic types
343
343
// / \return The reference type if parsed correctly, no value if parsing fails.
344
- optionalt< reference_typet>
345
- build_class_name (const std::string src, const std::string &class_name_prefix)
344
+ reference_typet
345
+ build_class_name (const std::string & src, const std::string &class_name_prefix)
346
346
{
347
347
PRECONDITION (src[0 ] == ' L' );
348
- // ends on ;
349
- if (src[src. size () - 1 ] != ' ; ' )
350
- return optionalt<reference_typet>( );
348
+
349
+ // All reference types must end on a ;
350
+ PRECONDITION (src[src. size () - 1 ] == ' ; ' );
351
351
352
352
std::string container_class = gather_full_class_name (src);
353
353
std::string identifier = " java::" + container_class;
@@ -536,12 +536,7 @@ typet java_type_from_string(
536
536
}
537
537
case ' L' :
538
538
{
539
- const optionalt<reference_typet> &class_type =
540
- build_class_name (src, class_name_prefix);
541
- if (class_type)
542
- return class_type.value ();
543
- else
544
- return nil_typet ();
539
+ return build_class_name (src, class_name_prefix);
545
540
}
546
541
case ' *' :
547
542
case ' +' :
You can’t perform that action at this time.
0 commit comments