Skip to content

Commit

Permalink
Fix duplicate case in T.Synth
Browse files Browse the repository at this point in the history
  • Loading branch information
rozlynd committed Jan 25, 2024
1 parent 2e2ee94 commit fdb9c09
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/type/t_hyps.ml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ let search_type_hyp ~inferer ~pol scx oe =
end

| Apply ({ core = Internal (B.Eq | B.Neq as b) }, [ { core = Ix n } ; e ])
when n = ix && ((pol && b = B.Neq) || (not pol && b = B.Eq)) ->
begin try
Some (inferer scx e)
with _ -> None
end

| Apply ({ core = Internal (B.Eq | B.Neq as b) }, [ e ; { core = Ix n } ])
when n = ix && ((pol && b = B.Neq) || (not pol && b = B.Eq)) ->
begin try
Expand Down

0 comments on commit fdb9c09

Please sign in to comment.