Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'unused open' warning not given when compiling with -annot #5747

Closed
vicuna opened this issue Aug 31, 2012 · 2 comments
Closed

'unused open' warning not given when compiling with -annot #5747

vicuna opened this issue Aug 31, 2012 · 2 comments
Assignees
Labels

Comments

@vicuna
Copy link

@vicuna vicuna commented Aug 31, 2012

Original bug ID: 5747
Reporter: @sliquister
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2015-12-11T18:08:01Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.00.0
Fixed in version: 4.01.0+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @hcarty

Bug description

The program in the following section should trigger the 'unused open' warning, but the warning is triggering only when the -annot flag is absent.

Steps to reproduce

/tmp$ ocamlopt -version
4.00.0
/tmp$ cat a.ml
module Result = struct
let x = 2
end
module Infix = Result

open Infix
include Result
let _ = x
/tmp$ ocamlopt -w +A -annot a.ml
/tmp$ ocamlopt -w +A a.ml
File "a.ml", line 6, characters 0-10:
Warning 33: unused open Infix.

Additional information

This bug is already present in 4.00+rc1, and I did not check any other version.
The -bin-annot flag does not trigger this problem.

@vicuna
Copy link
Author

@vicuna vicuna commented Sep 3, 2012

Comment author: @alainfrisch

Simpler reproduction case:

module Result = struct
let x = 2
end
module Infix = Result

open Infix
include Result
let _ = x

@vicuna
Copy link
Author

@vicuna vicuna commented Sep 3, 2012

Comment author: @alainfrisch

Well spotted, thanks!

Fixed in trunk, rev 12905. Will be part of the next major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants