1. HongboZhang
  2. ocaml

Commits

frisch  committed f901b60

Fix #5747 ('unused open' warning not given when compiling with -annot).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12905f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

  • Participants
  • Parent commits 1cf6faa
  • Branches master

Comments (0)

Files changed (2)

File Changes

View file
  • Ignore whitespace
 - PR#5731: instruction scheduling forgot to account for destroyed registers
 - PR#5735: %apply and %revapply not first class citizens
 - PR#5738: first class module patterns not handled by ocamldep
+- PR#5747: 'unused open' warning not given when compiling with -annot
 
 Internals:
 - Moved debugger/envaux.ml to typing/envaux.ml to publish env_of_only_summary

File typing/env.ml

View file
  • Ignore whitespace
     type 'a t = ('a * bool ref) Ident.tbl
 
     let empty = Ident.empty
-    let current_slot = ref (ref true)
+    let dummy_slot = ref true
+    let current_slot = ref dummy_slot
 
     let add id x tbl =
       Ident.add id (x, !current_slot) tbl
 
+    let add_dont_track id x tbl =
+      Ident.add id (x, dummy_slot) tbl
+
     let find_same_not_using id tbl =
       fst (Ident.find_same id tbl)
 
 and store_annot id path annot env =
   if !Clflags.annotations then
     { env with
-      annotations = EnvTbl.add id (path, annot) env.annotations }
+      annotations = EnvTbl.add_dont_track id (path, annot) env.annotations }
   else env
 
 and store_type id path info env =