From 4587862da79fb60ef2f71491dfc6f7d8eaa0c8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Tue, 28 Apr 2020 01:03:38 +0100 Subject: [PATCH] Fix in new typer: propagator for break_ctor was too permissive --- src/passes/8-typer-new/solver.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/passes/8-typer-new/solver.ml b/src/passes/8-typer-new/solver.ml index eeb84c39d..67b8b16b8 100644 --- a/src/passes/8-typer-new/solver.ml +++ b/src/passes/8-typer-new/solver.ml @@ -331,6 +331,9 @@ let selector_break_ctor : (type_constraint_simpl, output_break_ctor) selector = with the same sort of constraint (constructor vs. constructor) is symmetric *) let other_cs = (UnionFindWrapper.get_constraints_related_to c.tv dbs).constructor in + let other_cs = List.filter (fun (o : c_constructor_simpl) -> Var.equal c.tv o.tv) other_cs in + (* TODO double-check the conditions in the propagator, we had a + bug here because the selector was too permissive. *) let cs_pairs = List.map (fun x -> { a_k_var = c ; a_k'_var' = x }) other_cs in WasSelected cs_pairs | SC_Alias _ -> WasNotSelected (* TODO: ??? (beware: symmetry) *)