public enum Test
{
One,
Two
}
Expression<Func<bool, bool>> expr = flag => (flag ? Test.One : Test.Two) == Test.Two;
Expected:
flag => (flag ? Test.One : Test.Two) == Test.Two
or
flag => (int)(flag ? Test.One : Test.Two) == 1
Actual:
flag => ((int)flag ? Test.One : Test.Two) == 1