Skip to content

Commit

Permalink
Use newly introduced makeNonDetOfType method for poisons
Browse files Browse the repository at this point in the history
Signed-off-by: Hernan Ponce de Leon <[email protected]>
  • Loading branch information
hernan-poncedeleon committed Nov 13, 2023
1 parent 90819bf commit 9d3206b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -868,9 +868,7 @@ public Expression visitArrayConst(ArrayConstContext ctx) {
@Override
public Expression visitPoisonConst(PoisonConstContext ctx) {
// It is correct to replace a poison value with an undef value or any value of the type.
BooleanType booleanType = types.getBooleanType();
var nondeterministicExpression = new BNonDet(booleanType);
return expressions.makeCast(nondeterministicExpression, expectedType);
return makeNonDetOfType(expectedType);
}

@Override
Expand Down

0 comments on commit 9d3206b

Please sign in to comment.