Issue Details (XML | Word | Printable)

Key: GROOVY-2207
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Critical Critical
Assignee: Unassigned
Reporter: Daniel.Sun
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

row num and col num of error info is not correct

Created: 14/Oct/07 01:50 AM   Updated: 23/Dec/07 12:25 PM
Component/s: None
Affects Version/s: 1.1-rc-1
Fix Version/s: 1.1-rc-2

Time Tracking:
Not Specified

Issue Links:
Related
 


 Description  « Hide
run the following code
def a = new 

B()

get the error info:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script5: 1: unable to resolve class B
@ line 1, column 9.
1 error

row num should be 3 and the column num should be 1

if the code modifed as

def a = new B()

we will get the same error info:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script8: 1: unable to resolve class B
@ line 1, column 9.
1 error

Is the col 9 caculated by the following way?
1def2 3a4 5=6 7new8 9B()

I added the row num to groovy console.(GROOVY-2206), but did not add the col num because of the former reason.

Thanks,
Daniel.Sun



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Danno Ferrin added a comment - 20/Oct/07 10:18 PM
col number 9 is the beginning of the new expression, rather than the class B inside of the new expression. The expression generating the parse error starts at column number 9, so I am closing this as not a bug. It is a matter of interpretation as to whether the line information should point to the class, or the expression as the error, but since it is not demonstrably wrong, it is not a critical bug.