rsdn/nemerle — Issue #158: [c# support] auto ToExpression
Author: zyhong
Created: 2011-10-25 02:45:53+00:00
State: open

using System;
using Nemerle.Linq;

public class DD
{
void Test()
{
this.T1(ToExpression(s => T2(s))); //this compile fine
this.T1(s => T2(s)); // this works fine in ms c# compiler, but not in nemerle parser
}

public void T1(System.Linq.Expressions.Expression> e)
{
}
void T2(string s)
{
//return s;
}
}

The ToExpession work well for nemerle since there are no legacy code. but it will break a lot of existing code in c#(e.g. tesing code using Moq). Could we make this conversion implicit in c# support? Is there any better workaround for this?