| Anonymous | Login | Signup for a new account | 2013-05-26 05:22 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 | |||||||
| 0005657 | OCaml | OCaml typing | public | 2012-06-19 16:45 | 2012-06-21 19:12 | |||||||
| Reporter | furuse | |||||||||||
| Assigned To | frisch | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | ||||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0005657: Typing error locations of sugared record fields are strangely reported (in OCaml 4.00.0 beta) | |||||||||||
| Description | The typing error of the following code is reported with a strange location: -- type t = { a : int; b : int } let a = 1 let b = "hello" let _ = { a; b; } -- File "bug.ml", line 6, characters 10-14: Error: This expression has type string but an expression was expected of type int 10-14 contains "a; b;", not "b"... -- By the way, it would be nice if I could choose a Product Version OCaml 4.00.0 beta to report beta bugs. Is it not available for mere reporters? | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0007585) garrigue (manager) 2012-06-20 12:07 |
It is different from PR#5073, which is already fixed. I cannot seem to find the cause: apparently this is a bug in the parser, since this is where punning is handled, but everything seems correct... |
|
(0007602) frisch (developer) 2012-06-21 18:55 |
The lbl_expr_list is wrong: exp_of_label calls symbol_rloc (through mkexp), which returns the location of the whole left-hand side of the current action. Since lbl_expr_list matches the sequence of fields since the beginning, the rloc starts at the beginning of the sequence. |
|
(0007603) frisch (developer) 2012-06-21 19:11 |
Fixed in trunk (12636 for expressions, 12637 for patterns) and 4.00 (12638). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-06-19 16:45 | furuse | New Issue | |
| 2012-06-20 10:55 | frisch | Relationship added | duplicate of 0005073 |
| 2012-06-20 12:05 | garrigue | Relationship deleted | 0005073 |
| 2012-06-20 12:07 | garrigue | Note Added: 0007585 | |
| 2012-06-20 12:07 | garrigue | Status | new => confirmed |
| 2012-06-21 18:55 | frisch | Note Added: 0007602 | |
| 2012-06-21 19:11 | frisch | Note Added: 0007603 | |
| 2012-06-21 19:12 | frisch | Status | confirmed => resolved |
| 2012-06-21 19:12 | frisch | Resolution | open => fixed |
| 2012-06-21 19:12 | frisch | Assigned To | => frisch |
| Copyright © 2000 - 2011 MantisBT Group |