Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005629OCamlOCaml generalpublic2012-05-31 16:392012-06-01 16:08
Reportermottl 
Assigned Tofrisch 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformAnyOSAnyOS VersionAny
Product Version 
Target VersionFixed in Version 
Summary0005629: Developer version of OCaml 4 has buggy "unused open" warning
DescriptionI've just tried today's SVN snapshot of OCaml 4 to prepare my libraries for its new warnings. The "unused open" warning seems broken. It will incorrectly flag the following code:

  module M = struct type t = unit end
  open M
  let f (x : t) = x
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0007486)
frisch (developer)
2012-06-01 05:16

I cannot reproduce the problem. Are you sure your reproduction case is correct? How do you compile it?
(0007503)
mottl (reporter)
2012-06-01 15:33
edited on: 2012-06-01 15:34

My compiler:

  # ocaml -version
  The OCaml toplevel, version 4.01.0+dev3_2012-05-30

If I put the example in foo.ml, I run:

  ocaml -w A foo.ml

Result:

  File "foo.ml", line 2, characters 0-6:
  Warning 33: unused open M.

(0007504)
frisch (developer)
2012-06-01 15:42

Ok, I tried with the compiler, but the problem is only with the toplevel.
(0007505)
frisch (developer)
2012-06-01 16:08

Fixed in trunk (r12541) and 4.00 (r12542). Unused opens are still detected in the toplevel interpreter, but only if nested in a submodule.

- Issue History
Date Modified Username Field Change
2012-05-31 16:39 mottl New Issue
2012-06-01 05:09 frisch Assigned To => frisch
2012-06-01 05:09 frisch Status new => assigned
2012-06-01 05:16 frisch Note Added: 0007486
2012-06-01 10:25 frisch Status assigned => feedback
2012-06-01 15:33 mottl Note Added: 0007503
2012-06-01 15:33 mottl Status feedback => assigned
2012-06-01 15:34 mottl Note Edited: 0007503 View Revisions
2012-06-01 15:42 frisch Note Added: 0007504
2012-06-01 16:08 frisch Note Added: 0007505
2012-06-01 16:08 frisch Status assigned => resolved
2012-06-01 16:08 frisch Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker