strange behaviour of error indicator
When I write the following (stupid) program
int x = 1;
int x = 1;
int x = 1;
Epispin tells me that I have a redeclaration on line 2. That’s OK.
It doesn’t tell me that I have a redeclaration at line 3. That’s strange.When I now replace the x in line 2 by something else (say ‘y’) then the error indicator stays on line 2 and doesn’t move to line 3. Strange.
Submitted by Kees Pronk on 21 August 2011 at 14:58
Issue Log
Well, actually it does tell you that there is another redeclaration, but it is shown on line 2 (you will see two error messages over there). I think I’ve found the place where it goes wrong, but I’m not sure why it goes wrong.
@Lennart: I have my error constraint:
constraint-error: v@Var(name, init) -> (name, $[This variable is declared before]) where "double" := name
where i use the identifier ‘name’ to point to the code that should be underlined in case of the error. When I change it to
v@Var(name, init) -> (v, $[..])
the problem is solved, but then it underlines the variable with its initialization (and I actually do not want that). So my question is: is this a (known) Spoofax issue where things get messed up because multiple tuples with the same position identifier exist? Or do you have any other thoughts about it?
This problem was introduced with a Spoofax update which had a new implementation of origin tracking. I fixed the problem for version 1.0.2.
Log in to post comments