File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1855,12 +1855,11 @@ let report_error ppf = function
1855
1855
types (other than when replacing a type constructor with @ \
1856
1856
a type constructor with the same arguments).@]"
1857
1857
| Repeated_name (kind , name , repeated_loc ) ->
1858
- let start_line = repeated_loc.loc_start.pos_lnum in
1859
- let start_col = repeated_loc.loc_start.pos_cnum - repeated_loc.loc_start.pos_bol in
1860
- let end_col = repeated_loc.loc_end.pos_cnum - repeated_loc.loc_end.pos_bol in
1858
+ let (_, start_line, start_char) = Location. get_pos_info repeated_loc.loc_start in
1859
+ let (_, _, end_char) = Location. get_pos_info repeated_loc.loc_end in
1861
1860
fprintf ppf
1862
1861
" @[Multiple definition of the %s name %s at line %d, characters %d-%d.@ \
1863
- Names must be unique in a given structure or signature.@]" kind name start_line start_col end_col
1862
+ Names must be unique in a given structure or signature.@]" kind name start_line start_char end_char
1864
1863
| Non_generalizable typ ->
1865
1864
fprintf ppf
1866
1865
" @[The type of this expression,@ %a,@ \
You can’t perform that action at this time.
0 commit comments