You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7115 Reporter: @sliquister Assigned to:@alainfrisch Status: closed (set by @xavierleroy on 2017-09-24T15:31:43Z) Resolution: fixed Priority: normal Severity: minor Version: 4.02.3 Fixed in version: 4.03.0+dev / +beta1 Category: typing Monitored by:@gasche
Bug description
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:
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...
Original bug ID: 7115
Reporter: @sliquister
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2017-09-24T15:31:43Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.3
Fixed in version: 4.03.0+dev / +beta1
Category: typing
Monitored by: @gasche
Bug description
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.
as expected.
The text was updated successfully, but these errors were encountered: