1
Vote

RangeOps.cs: Cannot convert IEnumerable<MutableString> to IEnumerable<object>

description

When trying to build IronRuby for a v2Release under Mono 2.10.2, I'm
getting a failure:
 
% git clone https://github.com/IronLanguages/main.git IronLanguages
% cd IronLanguages
% xbuild Solutions/Ruby.sln /p:Configuration="v2Release"
...
Builtins/RangeOps.cs(307,17): error CS0266: Cannot implicitly convert
type System.Collections.Generic.IEnumerable<IronRuby.Builtins.MutableString>'
to
System.Collections.Generic.IEnumerable<object>'. An explicit
conversion exists (are you missing a cast?)
 
Building for the regular configuration is fine.

comments

dsblank wrote Nov 13, 2011 at 3:56 PM

This can be fixed for /p:Configuration="v2Release" for Mono with:

from:

if SILVERLIGHT

            return EachStepString(storage, self, ConvertStepToInt(storage, step)).Cast<object>();

else

            return EachStepString(storage, self, ConvertStepToInt(storage, step));

endif

to just:
            return EachStepString(storage, self, ConvertStepToInt(storage, step)).Cast<object>();
This may turn out to be more important than first thought, as having some trouble using Configuration v4 under Mono. Looking into that, but we will need to use v2 for the time being.