[IronPython] Can't call non-python instance method with argument name
Oonuki Makoto
YU5M-OONK at j.asahi-net.or.jp
Tue Jan 17 03:48:25 CET 2006
Hello,
Sorry if this is a known limitation, I've checked ML archive
and the bug tracker though...
I've got the following error with IP1.0 beta1 / .NET 2.0 (japanese).
It seems that IP uses int 10 as the instance instead of R.
---------------
>ironpythonconsole -X:ExceptionDetail
>>> import System
>>> R = System.Random()
>>> R.Next(maxValue=10)
System.Reflection.TargetException: Object does not match target type.
at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at IronPython.Runtime.ReflectedMethodBase.Invoke(MethodBinding binding)
at IronPython.Runtime.ReflectedMethodBase.Call(Object[] args, String[] names)
at IronPython.Runtime.Ops.Call(Object func, Object[] args, String[] names)
at input##2(Frame )
at IronPython.Runtime.FrameCodeDelegate.Invoke(Frame frame)
at IronPython.Runtime.FrameCode.Run(Frame frame)
at IronPython.Hosting.PythonEngine.DoOneInteractive(Frame topFrame)
at IronPython.Hosting.PythonEngine.RunInteractive()
StandardError: Object does not match target type.
More information about the Ironpython-users
mailing list