Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006170OCamlCamlp4public2013-09-11 11:572013-09-12 16:20
Assigned Tohongboz 
PlatformOSOS Version
Product Version4.01.0+beta/+rc 
Target VersionFixed in Version 
Summary0006170: camlp4o wrongly reports the location of Pexp_ident
DescriptionIt seems that camlp4o's locations for identifiers are not cover the all Longident.ts but only point to the last Lident compoments.

For example, X.x is parsed by camlp4o as Pexp_ident {loc}, where loc only points the part of 'x', not the whole 'X.x'.

This requires a workaround of handling identifier's locations for applications which utilize cmt files like ocamlspotter and probably Typerex.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
hongboz (developer)
2013-09-11 14:43

This should be fixable, would you mind upload a minimal example?
furuse (reporter)
2013-09-12 06:12

Compile the following:

module X = struct
  let x = 1

let _ = X.x

With ocamlc -dparsetree and ocamlc -dparsetree -pp camlp4o .

Then you can see the location difference of Pexp_ident "X.x". Preprocessed version has only 1 char width for "X.x".
hongboz (developer)
2013-09-12 16:18

Thanks for your reporting. Fixed in revision 14116

- Issue History
Date Modified Username Field Change
2013-09-11 11:57 furuse New Issue
2013-09-11 14:43 hongboz Note Added: 0010334
2013-09-12 06:12 furuse Note Added: 0010344
2013-09-12 16:18 hongboz Note Added: 0010348
2013-09-12 16:20 hongboz Assigned To => hongboz
2013-09-12 16:20 hongboz Status new => resolved
2013-09-12 16:20 hongboz Resolution open => fixed

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker