Skip to content

Commit

Permalink
Remove problematic intersections.
Browse files Browse the repository at this point in the history
  • Loading branch information
skaller committed Sep 12, 2022
1 parent 9a38d9f commit 7565b21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions src/compiler/flx_core/flx_bexpr.ml
Original file line number Diff line number Diff line change
Expand Up @@ -743,11 +743,8 @@ let rec bexpr_intersect es =
aux (out @ flds) tail

| _ ->
aux (out @ ["",h]) tail
(*
print_endline ("bexpr_intersect requires arguments to be records at the moment");
assert false
*)
in bexpr_record (aux [] es)

(************************ END POLYRECORD **************************)
Expand Down
8 changes: 1 addition & 7 deletions src/test/regress/rt/intersection-01.fdoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ var z2 = (a=1,a=99, b=2 | y);
println$ z2._strr;

// tuple intersection
println$ ((1,2) /\ (3.0, "hello") /\ (a=1) /\ "hi")._strr;
println$ 1 /\ 2 /\ 7;

fun pair[A,B] (a:A, b:B)=> a /\ b;
println$ pair ((1,2),(3,4));
println$ ((1,2) /\ (3.0, "hello") /\ (a=1))._strr;
@expect
(42, 1)
(142, 3)
Expand All @@ -48,6 +44,4 @@ println$ pair ((1,2),(3,4));
(a=1,a=77,b=2,c=4)
(a=1,a=99,a=77,b=2,c=4)
(=1,=2,=3,='hello',='hi',a=1)
(1, 2, 7)
((1, 2), (3, 4))
@

0 comments on commit 7565b21

Please sign in to comment.