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

[@warning "-34"] does not work #7886

Closed
vicuna opened this issue Dec 27, 2018 · 4 comments
Closed

[@warning "-34"] does not work #7886

vicuna opened this issue Dec 27, 2018 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Dec 27, 2018

Original bug ID: 7886
Reporter: dinosaure
Status: acknowledged (set by @diml on 2019-01-07T13:22:55Z)
Resolution: open
Priority: normal
Severity: minor
Category: language features
Monitored by: @nojb @gasche

Bug description

May be it's not an issue but I expect to discard the warning 34 in some pieces of my code instead to have a global [@@@warning "-34"] in my code. So, type[@warning "-34"] should work.

Currently on OCaml 4.07.0.

Steps to reproduce

$ touch test.mli
$ echo 'type[@warning "-34"] foo = unit' > test.ml
$ ocamlc -w @34 test.mli test.ml
Error (warning 34): unused type foo.
@vicuna
Copy link
Author

vicuna commented Jan 7, 2019

Comment author: @diml

A temporary workaround:

include struct
[@@@warning "-34"]
type foo = unit
end

@AndrewLitteken
Copy link
Contributor

Is this still an available bug? I would be interested in working on this as an initial contribution.

@AndrewLitteken
Copy link
Contributor

I believe that this bug is corrected in the current version of the repository. I cannot reproduce it

@Armael
Copy link
Member

Armael commented Apr 6, 2019

Indeed, looking through the Changes files, it looks like this was fixed in #1977. Thank you for pointing that out!

@Armael Armael closed this as completed Apr 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants