[CLJ-1130] Invoking a static method with the wrong number of arguments results in a NoSuchFieldException, rather than a proper message that the arguments could not be matched to the method Created: 17/Dec/12 Updated: 06/Jan/13
|Affects Version/s:||Release 1.4|
|Reporter:||Howard Lewis Ship||Assignee:||Unassigned|
My code inadventently invoked a method that expected a single parameter, but passed no parameters.
That threw me for a bit; really, it looks like the compiler is attempting to access a field and invoke it as an IFn. However, a proper message would be "getService() requires 1 parameter, not 0" (or something to that effect). Even "invalid number of parameters for SmashRuntime/getService()" would be better.
|Comment by Michael Drogalis [ 06/Jan/13 6:44 PM ]|
It looks like it's first trying to resolve a field by name, since field access with / is legal. For example:
Would trying to resolve a method before a field fix this?