Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.6.4
-
None
-
None
-
None
Description
The following:
foo = 5 foo()
results in:
Caught: groovy.lang.MissingMethodException: No signature of method: java.lang.Integer.call() is applicable for argument types: () values: [] at MyScript.run(MyScript.groovy:2)
This is bad for at least two reasons:
- The error message is hard to understand (should be: No signature of method: MyScript.foo() is applicable for argument types: () values: [])
- invokeMethod and methodMissing don't get a chance to intercept the method call
Likely solution: Change line 1093 of MetaClassImpl.java to: if(bindingVar instanceof Closure) {
Attachments
Issue Links
- relates to
-
GROOVY-2503 MOP 2.0 design inflluencing issues
- Open