IndexOutOfRangeException

Mar 27, 2008 at 5:13 PM
This expression will throw an IndexOutOfRangeException: A(A(false, false), false, false)

Again, the most simple code I can produce

  public partial class Form1 : Form
    {
        private void button1_Click (object sender, EventArgs e)
        {
            string text;
            text = @"A(A(false, false), false, false)";
            ExpressionContext ctx = new ExpressionContext ();
            ctx.Imports.AddMethod ("A", typeof (FleeHelper), "");
 
            IGenericExpression<bool> executer = ExpressionFactory.CreateGeneric<bool> (text, ctx);
            bool result = executer.Evaluate ();
        }
    }
 
    public static class FleeHelper
    {
        public static bool A (params bool[] args)
        {
            return true;
        }
    }
Coordinator
Mar 28, 2008 at 3:57 PM
Looks like another bug. After fixing the bug in your other post, I think I have an idea as to what is causing this one.
Coordinator
Mar 29, 2008 at 3:15 AM
Fixed in Flee-0.9.17.5