Skip to content
Snippets Groups Projects
Commit e6b644f4 authored by Pierre Loic Garoche's avatar Pierre Loic Garoche
Browse files

better negation of constants

parent 0323b9e6
No related branches found
No related tags found
No related merge requests found
...@@ -1369,8 +1369,9 @@ let rec push_negations ?(neg=false) e = ...@@ -1369,8 +1369,9 @@ let rec push_negations ?(neg=false) e =
| _ -> assert false | _ -> assert false
) )
| Expr_const _ | Expr_const c -> if neg then map (Expr_const (const_negation c)) else e
| Expr_ident _ -> if neg then | Expr_ident _ ->
if neg then
mkpredef_call e.expr_loc "not" [e] mkpredef_call e.expr_loc "not" [e]
else else
e e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment