Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.6-beta-2
-
None
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
Attachments
Issue Links
- relates to
-
GROOVY-2983 wrong line number in 1.6 for getting an property
- Closed