Commit 09152eed authored by Julien Lopez's avatar Julien Lopez
Browse files

[TESTS][LAMBDA] Fix environment for pairs in match

parent 3932c71c
...@@ -162,11 +162,11 @@ and parse_match_value env l list p toptype = match p with ...@@ -162,11 +162,11 @@ and parse_match_value env l list p toptype = match p with
line cbegin cend; line cbegin cend;
Printf.eprintf " type %s is not a pair\n" Printf.eprintf " type %s is not a pair\n"
(Types.Print.to_string (type_of_ptype toptype)); raise Error) in (Types.Print.to_string (type_of_ptype toptype)); raise Error) in
let t1, d1, list, l, b1 = parse_match_value env l list m1 top1 in let t1, d1, list1, l, b1 = parse_match_value env l list m1 top1 in
let t2, d2, list, l, b2 = parse_match_value env l list m2 top2 in let t2, d2, list2, l, b2 = parse_match_value env l list m2 top2 in
times (cons t1) (cons t2), times (cons t1) (cons t2),
Patterns.Times (make_patterns t1 [] d1, make_patterns t2 [] d2), Patterns.Times (make_patterns t1 list1 d1, make_patterns t2 list2 d2),
list, l, b1 && b2; (list1 @ list2), l, b1 && b2;
| MVar (_, mname, mtype) -> | MVar (_, mname, mtype) ->
let lsize = Locals.cardinal l in let lsize = Locals.cardinal l in
let l = Locals.add mname lsize l in let l = Locals.add mname lsize l in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment