Fix for tuples of consts used as args

This commit is contained in:
Cédric Pasteur 2012-09-14 15:42:49 +02:00
parent 9334b73ef1
commit 96e233b64c

View file

@ -73,9 +73,11 @@ let e_to_e_list e = match e.e_desc with
| _ -> assert false
let flatten_e_list l =
let flatten = function
| { e_desc = Eapp({ a_op = Etuple }, l, _) } -> l
| e -> [e]
let flatten e =
if is_list e then
e_to_e_list e
else
[e]
in
List.flatten (List.map flatten l)