Skip to content

Commit b2f57e8

Browse files
thk123svorenova
thk123
authored and
svorenova
committed
Fixing handling the case of *
1 parent 31faaa6 commit b2f57e8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/java_bytecode/java_types.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,20 @@ typet java_type_from_string(
389389

390390
return java_reference_type(symbol_type);
391391
}
392+
case '*':
393+
{
394+
// parse name of type variable
395+
INVARIANT(src[src.size()-1]==';', "Generic type name must end on ';'.");
396+
PRECONDITION(!class_name.empty());
397+
// INVARIANT(
398+
// src.substr(1, src.size()-2)=="*",
399+
// "Wildcard types do not have a name");
400+
irep_idt type_var_name(class_name+"::*");
401+
return java_generic_parametert(
402+
type_var_name,
403+
java_type_from_string("Ljava/lang/Object;").subtype());
404+
}
405+
392406

393407
default:
394408
return nil_typet();

0 commit comments

Comments
 (0)