[IronPython] How does IronPython resolve overloads?

Nev Delap nev at delap.com
Sun Jan 2 10:45:24 CET 2005


Hi there.

Can anyone tell me, or point me at a link that will tell me how IronPython chooses which overloaded method to call? In the example below the Open() method has a number of overloads...

  1. Open()
  2. Open(string)
  3. Open(string[])
  4. Open(delegate) // async versions with a delegate to call when the async open completes.
  5. Open(string, delegate)
  6. Open(string[], delegate)

In the example I want it to be calling #1, but it seems to be calling #4, and then failing to create a delegate out of the string parameter.

Any help will be greatly appreciated.

Nev

>>> connection.Open("elvin://localhost")
System.ArgumentException: Error binding to target method.
   at System.Delegate.InternalCreate(Object target, String method, Boolean ignoreCase)
   at System.Delegate.CreateDelegate(Type type, Object target, String method)
   at IronPython.Objects.Ops.GetDelegate(Object o, Type delegateType)
   at IronPython.Objects.Ops.ConvertTo(Object inObject, Type toType, Object& outObject)
   at IronPython.Objects.ReflectedMethodBase.BindArgs(MethodBase info, Object& instance, Object[] args)
   at IronPython.Objects.ReflectedMethodBase.Call(Object[] args)
   at IronPython.Objects.Ops.Call(Object func, Object arg0)
   at input_41.Run(Frame frame)
   at IronPythonConsole.IronPython.DoInteractive()
>>>





More information about the Ironpython-users mailing list