summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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