Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.6-beta-2
-
Fix Version/s: 1.6-rc-1, 1.7-beta-1
-
Component/s: bytecode
-
Labels:None
-
Number of attachments :
Description
The following code
foo = new Foo() if(foo.hello()()) { println "do" println "do" println "do" println "do" } class Foo { boolean hello() {true} }
Produces the error
groovy.lang.MissingMethodException: No signature of method: java.lang.Boolean.call() is applicable for argument types: () values: {} at Script1.run(Script1:7)
As you can see the line number says its line 7 (the closing bracket of the if) which is confusing as the actual problem is on line 3. I spent ages slowing ripping out more and more code inside a larger if trying to figure out what the problem was
Issue Links
- relates to
-
GROOVY-2983
wrong line number in 1.6 for getting an property
-
Activity
blackdrag blackdrag
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Jochen Theodorou [ blackdrag ] | |
| Component/s | bytecode [ 11336 ] |
Guillaume Laforge
made changes -
| Fix Version/s | 1.6-rc-1 [ 14009 ] | |
| Fix Version/s | 1.6-beta-2 [ 14261 ] |
blackdrag blackdrag
made changes -
| Link |
This issue relates to |
blackdrag blackdrag
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | 1.7-beta-1 [ 14014 ] |