[IronPython] Failing to find overload match when object is None

Dino Viehland dinov at microsoft.com
Sat Apr 18 19:36:43 CEST 2009

Yeah, I saw that too :(

I think we can definitely add a message for None so that this gets 
better. At the very least we can report all of the types of arguments 
that we received so the None is at least in your face.  In general we 
want to improve all of our error messages as they're frequently not 
good or useful for complicated overloads.

> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Michael Foord
> Sent: Saturday, April 18, 2009 6:21 AM
> To: Discussion of IronPython
> Subject: [IronPython] Failing to find overload match when object is
> None
> Hello guys,
> I saw a message on Twitter yesterday:
>     Finding IronPython mildly annoying, with errors like: "TypeError:
> Multiple targets could match: AddFile(str), AddFile(FileInfo)"
> Needless to say the problem was that he was passing in None - which
> could match any of the overloads that take reference types. This has
> bitten me before. Would it be possible to make the error message more
> helpful where a match can't be found because an object passed in is
> None.
> As this code path would only be exercised if an exception is about to
> be
> raised it shouldn't need to slow down the normal cases of overload
> resolution.
> Michael
> --
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/blog
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

More information about the Ironpython-users mailing list