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: 5657 Reporter: furuse Assigned to:@alainfrisch Status: closed (set by @xavierleroy on 2015-12-11T18:07:03Z) Resolution: fixed Priority: normal Severity: minor Category: typing
Bug 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?
The text was updated successfully, but these errors were encountered:
It is different from #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...
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.
Original bug ID: 5657
Reporter: furuse
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2015-12-11T18:07:03Z)
Resolution: fixed
Priority: normal
Severity: minor
Category: typing
Bug 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?
The text was updated successfully, but these errors were encountered: