Here is a related problem with casting an array to a duck. We don't even get read access! (BTW, this occurs also if we do the retrieval outside the interactive context)
>>> arr = (1,2,3) as duck
(1, 2, 3)
>>> arr[1]
System.MissingMethodException: Method System.Int32[].ToString not found.
at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Bind
er binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at Boo.Lang.Runtime.RuntimeServices.GetSlice(Object target, String name, Object[] args)
at Input2Module.Main(String[] argv)
steve donovan - 29/Jun/05 07:34 AM Here is a related problem with casting an array to a duck. We don't even get read access! (BTW, this occurs also if we do the retrieval outside the interactive context)
>>> arr = (1,2,3) as duck
(1, 2, 3)
>>> arr[1]
System.MissingMethodException: Method System.Int32[].ToString not found.
at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Bind
er binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at Boo.Lang.Runtime.RuntimeServices.GetSlice(Object target, String name, Object[] args)
at Input2Module.Main(String[] argv)
steve d.
I'm not sure if I did everything correctly and didn't forget anything, however I spent some time on figuring this bug and created a fix. Works for me (for now), hope it will help the others! Also fixes BOO-662.
Snaury - 23/May/06 07:48 AM I'm not sure if I did everything correctly and didn't forget anything, however I spent some time on figuring this bug and created a fix. Works for me (for now), hope it will help the others! Also fixes BOO-662.
>>> arr = (1,2,3) as duck
(1, 2, 3)
>>> arr[1]
System.MissingMethodException: Method System.Int32[].ToString not found.
at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Bind
er binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at Boo.Lang.Runtime.RuntimeServices.GetSlice(Object target, String name, Object[] args)
at Input2Module.Main(String[] argv)
steve d.