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?
to your account
Original bug ID: 7115
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2017-09-24T15:31:43Z)
Fixed in version: 4.03.0+dev / +beta1
Monitored by: @gasche
The following code:
type t = A : t
let _apply_implementation t ~x =
match t with
| A -> let x = () in x
should complain about "unused variable x" but doesn't.
If instead [t] is defined as [type t = A], or if the two [x] variables are given different names, then we get:
$ ocamlopt -w +a /tmp/a.ml
File "/tmp/a.ml", line 2, characters 29-30:
Warning 27: unused variable x.
The text was updated successfully, but these errors were encountered:
Comment author: @alainfrisch
Probably related to the function duplicate_ident_types in typecore.ml, which says:
(* XXX This will mark the value as being used;
I don't think this is what we want *)
Sorry, something went wrong.
Fix committed to trunk (4e8cb78). 'unused open' was similarly affected. I still don't understand the need to lookup the environment for existing bindings whose name match bound variables...
Comment author: @sliquister
No branches or pull requests