Skip to content

Commit caae4ce

Browse files
author
Daniel Kroening
committed
strengthen assignment type consistency
The previous check for type consistency of assignments uses base_type_eq, which permits the expansion of tag types. This expansion makes dealing with such types prone to error and costs memory and performance.
1 parent 0181841 commit caae4ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/std_code.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ class code_assignt:public codet
303303

304304
DATA_CHECK(
305305
vm,
306-
base_type_eq(code.op0().type(), code.op1().type(), ns),
306+
code.op0().type() == code.op1().type(),
307307
"lhs and rhs of assignment must have same type");
308308
}
309309

0 commit comments

Comments
 (0)