diff options
Diffstat (limited to 'typing/parmatch.ml')
| -rw-r--r-- | typing/parmatch.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/typing/parmatch.ml b/typing/parmatch.ml index 5f360dac8b..4ffb68aecc 100644 --- a/typing/parmatch.ml +++ b/typing/parmatch.ml @@ -2599,8 +2599,10 @@ let all_rhs_idents exp = Tmod_unpack ({exp_desc=Texp_ident (Path.Pident id_exp,_,_)},_)}, _) -> assert (Ident.Set.mem id_exp !ids) ; - if not (Ident.Set.mem id_mod !ids) then begin + begin match id_mod with + | Some id_mod when not (Ident.Set.mem id_mod !ids) -> ids := Ident.Set.remove id_exp !ids + | _ -> () end | _ -> assert false end |
