summaryrefslogtreecommitdiff
path: root/bytecomp/typeopt.ml
diff options
context:
space:
mode:
Diffstat (limited to 'bytecomp/typeopt.ml')
-rw-r--r--bytecomp/typeopt.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/bytecomp/typeopt.ml b/bytecomp/typeopt.ml
index 0dae07a44d..ed019747cf 100644
--- a/bytecomp/typeopt.ml
+++ b/bytecomp/typeopt.ml
@@ -38,7 +38,8 @@ let maybe_pointer exp =
not (Path.same p Predef.path_char) &&
begin try
match Env.find_type p exp.exp_env with
- {type_kind = Type_variant cstrs} ->
+ {type_kind = Type_variant []} -> true (* type exn *)
+ | {type_kind = Type_variant cstrs} ->
List.exists (fun (name, args) -> args <> []) cstrs
| _ -> true
with Not_found -> true