Commit 238f2358 authored by POTTIER Francois's avatar POTTIER Francois

Remove the quick-and-dirty mechanism for keeping track of the current location.

parent 2e18af98
......@@ -82,25 +82,6 @@ let sum_build_warning (decl : type_declaration) : unit =
(* -------------------------------------------------------------------------- *)
(* A quick-and-dirty mechanism for registering the current type declaration
(the one that is being processed). We use it to obtain a location for
certain warnings. *)
let current_decl : type_declaration option ref =
ref None
let currently decl =
current_decl := Some decl
let current () =
match !current_decl with
| None ->
Location.none (* should not happen *)
| Some decl ->
decl.ptype_loc
(* -------------------------------------------------------------------------- *)
(* Shared glue code for detecting and warning against name clashes. *)
let protect3 (f : Location.t * attributes * Longident.t -> methode) format =
......@@ -1219,7 +1200,6 @@ let visit_decl (decl : type_declaration) : expression =
no result. *)
let type_decl (decl : type_declaration) : unit =
currently decl;
let alphas = poly_params decl in
generate_concrete_method
(local_tycon_visitor_method decl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment