summaryrefslogtreecommitdiff
path: root/typing/printtyp.ml
diff options
context:
space:
mode:
Diffstat (limited to 'typing/printtyp.ml')
-rw-r--r--typing/printtyp.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/typing/printtyp.ml b/typing/printtyp.ml
index ed8b2e75f9..2b5470ea48 100644
--- a/typing/printtyp.ml
+++ b/typing/printtyp.ml
@@ -236,7 +236,8 @@ let name_of_type t =
(* No name available, create a new one *)
new_name ()
in
- names := (t, name) :: !names;
+ (* Exception for type declarations *)
+ if name <> "_" then names := (t, name) :: !names;
name
let check_name_of_type t = ignore(name_of_type t)