Issue Details (XML | Word | Printable)

Key: GROOVY-2243
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Jochen Theodorou
Reporter: Jochen Theodorou
Votes: 0
Watchers: 1
Operations

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

missing method list in exception

Created: 25/Oct/07 08:26 AM   Updated: 26/Oct/07 05:40 AM
Component/s: None
Affects Version/s: 1.1-rc-1
Fix Version/s: 1.1-rc-2

Time Tracking:
Not Specified


 Description  « Hide
using this script:

def foo(Number s){}
def foo(int i ){}

foo()

an exception is thrown whcih looks like:

Caught: groovy.lang.GroovyRuntimeException: Could not find which method to invoke from this list: org.codehaus.groovy.reflection.FastArray@9df354 for arguments: {}
groovy.lang.GroovyRuntimeException: Could not find which method to invoke from this list: org.codehaus.groovy.reflection.FastArray@9df354 for arguments: {}

the org.codehaus.groovy.reflection.FastArray@9df354 is wrong, at his place there should be a list of the available methods of that name that is foo(Number) and foo(int), but no toString default implementation. This text is important for the user to find an error.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jochen Theodorou added a comment - 26/Oct/07 05:40 AM
the new message text is now something like this:

Could not find which method foo() to invoke from this list:
public java.lang.Object test#foo(int)
public java.lang.Object test#foo(java.lang.Number)