diff options
author | Alain Frisch <alain@frisch.fr> | 2006-09-11 12:25:31 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2006-09-11 12:25:31 +0000 |
commit | 71efd582d77855b9fa9fb591e3efb48f2113f5ed (patch) | |
tree | 9b47c9d7ad773c40b383bc92b20760ed84bf17da | |
parent | 32d137f2e4c0fc3728c7fde1d80d7f7e8322fce0 (diff) | |
download | ocaml-71efd582d77855b9fa9fb591e3efb48f2113f5ed.tar.gz |
*** empty log message ***
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cducetrunk@7598 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | typing/typeext.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/typing/typeext.ml b/typing/typeext.ml index b7799b8b65..55f4e623f2 100644 --- a/typing/typeext.ml +++ b/typing/typeext.ml @@ -764,12 +764,14 @@ let ext_branch env loc t p a = let z = lazy ( let ta = compute_var loc a CT.any in let ta = CT.cap t ta in - if (CT.is_empty ta) && (loc != Location.none) then + let unused = CT.is_empty ta in + if unused && (loc != Location.none) then Location.prerr_warning loc Warnings.Unused_match; let res = P.filter ta p in (* HACK to avoid changing the interface of the Warnings module. *) - if (Warnings.is_active Warnings.Unused_match) + if (Warnings.is_active Warnings.Unused_match) && (loc != Location.none) + && not unused then Cduce_types.Ident.IdMap.iteri (fun x t -> if (CT.subtype (CT.descr t) SEQ.nil_type) then |