summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2001-12-07 07:27:59 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2001-12-07 07:27:59 +0000
commit20a6cd3e179fa1debea3b11999c9872c16f3e1e0 (patch)
tree35ae4f847c8f577bb9687307d00f2e55b205bb93
parentaf050116d64f62aaf70f68875f8c4c6a65263928 (diff)
wrong warning
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4141 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--typing/typecore.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/typing/typecore.ml b/typing/typecore.ml
index 907af2cb2..72d27b9e3 100644
--- a/typing/typecore.ml
+++ b/typing/typecore.ml
@@ -1420,7 +1420,7 @@ and type_expect ?in_function env sexp ty_expected =
(Some sexp.pexp_loc) caselist in
let all_labeled ty =
let ls, tvar = list_labels env ty in
- tvar || List.exists (fun l -> l = "" || l.[0] = '?') ls
+ not (tvar || List.exists (fun l -> l = "" || l.[0] = '?') ls)
in
if is_optional l && all_labeled ty_res then
Location.prerr_warning (fst (List.hd cases)).pat_loc