| Anonymous | Login | Signup for a new account | 2013-05-19 06:05 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0005791 | OCaml | OCaml tools (ocaml{lex,yacc,dep,browser}) | public | 2012-10-15 16:15 | 2012-10-16 15:25 | |||
| Reporter | kosik | |||||||
| Assigned To | frisch | |||||||
| Priority | normal | Severity | feature | Reproducibility | always | |||
| Status | closed | Resolution | no change required | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 4.00.1 | |||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0005791: Some unused variables go undetected | |||||||
| 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"). | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0008256) frisch (developer) 2012-10-15 16:27 |
Are you sure warning 27, and not only 26, is enabled? |
|
(0008257) kosik (reporter) 2012-10-15 16:43 |
Yes. Sorry. When I enabled that option, I've got the warning. |
|
(0008258) kosik (reporter) 2012-10-15 16:48 |
So I think I raised a false alarm, actually. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-10-15 16:15 | kosik | New Issue | |
| 2012-10-15 16:27 | frisch | Note Added: 0008256 | |
| 2012-10-15 16:43 | kosik | Note Added: 0008257 | |
| 2012-10-15 16:48 | kosik | Note Added: 0008258 | |
| 2012-10-16 15:25 | frisch | Status | new => closed |
| 2012-10-16 15:25 | frisch | Assigned To | => frisch |
| 2012-10-16 15:25 | frisch | Resolution | open => no change required |
| Copyright © 2000 - 2011 MantisBT Group |