Skip to content

Commit 2365014

Browse files
committed
JBMC: struct components cannot be methods
Cleanup of an unnecessary branch: Any such component would be a pointer/reference, not an actual code-typed element.
1 parent 0a09814 commit 2365014

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
@@ -126,7 +126,9 @@ std::string expr2javat::convert_struct(
126126

127127
for(const auto &c : components)
128128
{
129-
if(c.type().id() != ID_code)
129+
DATA_INVARIANT(
130+
c.type().id() != ID_code, "struct member must not be of code type");
131+
130132
{
131133
std::string tmp=convert(*o_it);
132134
std::string sep;

0 commit comments

Comments
 (0)