Skip to content

Commit

Permalink
Fix type-checking errors in Addition and Remainder statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomo-boldini committed Feb 7, 2024
1 parent a30bd0e commit 2fc4e73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public <A extends AbstractState<A>> AnalysisState<A> fwdBinarySemantics(
SymbolicExpression right,
StatementStore<A> expressions)
throws SemanticException {
if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType))
if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType))
return state.bottom();
if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType))
return state.bottom();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public <A extends AbstractState<A>> AnalysisState<A> fwdBinarySemantics(
throws SemanticException {
if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType))
return state.bottom();
if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType))
if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType))
return state.bottom();

return state.smallStepSemantics(
Expand Down

0 comments on commit 2fc4e73

Please sign in to comment.