protected override Expression /*!*/ MakeValidatorCall(CallArguments /*!*/ args, Expression /*!*/ targetClassNameConstant, Expression /*!*/ result)
 {
     return(AstUtils.LightDynamic(ConvertToStrAction.Make(args.RubyContext), AstUtils.Box(result)));
 }
        public static CompositeConversionAction Make(RubyContext context, CompositeConversion conversion)
        {
            switch (conversion)
            {
            case CompositeConversion.ToFixnumToStr:
                return(new CompositeConversionAction(conversion,
                                                     typeof(Union <int, MutableString>), ConvertToFixnumAction.Make(context), ConvertToStrAction.Make(context)
                                                     ));

            case CompositeConversion.ToStrToFixnum:
                return(new CompositeConversionAction(conversion,
                                                     typeof(Union <MutableString, int>), ConvertToStrAction.Make(context), ConvertToFixnumAction.Make(context)
                                                     ));

            case CompositeConversion.ToIntToI:
                return(new CompositeConversionAction(conversion,
                                                     typeof(IntegerValue), ConvertToIntAction.Make(context), ConvertToIAction.Make(context)
                                                     ));

            case CompositeConversion.ToAryToInt:
                return(new CompositeConversionAction(conversion,
                                                     typeof(Union <IList, int>), ConvertToArrayAction.Make(context), ConvertToFixnumAction.Make(context)
                                                     ));

            default:
                throw Assert.Unreachable;
            }
        }