Skip to content

Commit 238d7b8

Browse files
author
Daniel Kroening
committed
fix type operand of instanceof
1 parent fbbf9d5 commit 238d7b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jbmc/src/java_bytecode/expr2java.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ std::string expr2javat::convert_java_instanceof(const exprt &src)
361361
return convert_norep(src, precedence);
362362
}
363363

364-
return convert(src.op0())+" instanceof "+convert(src.op1().type());
364+
const auto type = java_reference_type(to_struct_tag_type(src.op1().type()));
365+
366+
return convert(src.op0()) + " instanceof " + convert(type);
365367
}
366368

367369
std::string expr2javat::convert_code_java_new(const exprt &src, unsigned indent)

0 commit comments

Comments
 (0)