diff options
author | Aymeric Fromherz | 2023-09-22 16:40:31 +0200 |
---|---|---|
committer | Aymeric Fromherz | 2023-09-22 16:43:39 +0200 |
commit | e75879992c5a5a5102a4c5f20b90e6a1032b8ec5 (patch) | |
tree | ddbd3747682969a9a06162a4f57ef1eefed38cd7 | |
parent | 28f4ea9ffe02d4204bb60273b6a77db7ed48781b (diff) |
Add support for Shl/Shr typechecking in InterpreterExpressions
-rw-r--r-- | compiler/InterpreterExpressions.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/InterpreterExpressions.ml b/compiler/InterpreterExpressions.ml index 8b2070c6..469bebec 100644 --- a/compiler/InterpreterExpressions.ml +++ b/compiler/InterpreterExpressions.ml @@ -523,7 +523,10 @@ let eval_binary_op_symbolic (config : C.config) (binop : E.binop) | E.BitOr -> assert (int_ty1 = int_ty2); T.Literal (Integer int_ty1) - | E.Shl | E.Shr -> raise Unimplemented + | E.Shl | E.Shr -> + (* The number of bits can be of a different integer type + than the operand *) + T.Literal (Integer int_ty1) | E.Ne | E.Eq -> raise (Failure "Unreachable")) | _ -> raise (Failure "Invalid inputs for binop") in |