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: 5791 Reporter: kosik Assigned to:@alainfrisch Status: closed (set by @alainfrisch on 2012-10-16T13:25:13Z) Resolution: not a bug Priority: normal Severity: feature Version: 4.00.1 Category: tools (ocaml{lex,yacc,dep,debug,...})
Bug description
Ocaml detects and reports unused variables.
This feature is useful.
However, when I bind variables by pattern-matching a record-value, Ocaml compiler does not report bound but otherwise unused variables which is probably not an expected behavior, I guess.
Steps to reproduce
When I try to compile the following program:
type foo = {bar:int; baz:string}
;;
match {bar=5; baz="five"} with
| {bar; baz} -> ();
either as:
ocamlfind c -g main.ml -o main
or as:
ocamlfind opt -g main.ml -o main
I do not get the usual warnings about unused variables (in this case "bar" and "baz").
The text was updated successfully, but these errors were encountered:
Original bug ID: 5791
Reporter: kosik
Assigned to: @alainfrisch
Status: closed (set by @alainfrisch on 2012-10-16T13:25:13Z)
Resolution: not a bug
Priority: normal
Severity: feature
Version: 4.00.1
Category: tools (ocaml{lex,yacc,dep,debug,...})
Bug description
Ocaml detects and reports unused variables.
This feature is useful.
However, when I bind variables by pattern-matching a record-value, Ocaml compiler does not report bound but otherwise unused variables which is probably not an expected behavior, I guess.
Steps to reproduce
When I try to compile the following program:
type foo = {bar:int; baz:string}
;;
match {bar=5; baz="five"} with
| {bar; baz} -> ();
either as:
ocamlfind c -g main.ml -o main
or as:
ocamlfind opt -g main.ml -o main
I do not get the usual warnings about unused variables (in this case "bar" and "baz").
The text was updated successfully, but these errors were encountered: