dadhi/FastExpressionCompiler

CompileFast doesn't work with HasFlag

ABatenev opened this issue · 7 comments

I have a flag enum, like

[Flags]
enum Foo
{
      None = 0,
      Black = 1,
      Red = 2,
      Green = 4,
      Blue = 8
}

class Bar
{
     Foo Foo
}

and i have expression

Expression<Func<Bar, bool>>= new(x => x.Foo.HasFlag(Foo.Green ))

After which I get the following error: System.ExecutionEngineException: "Exception_WasThrown"

dadhi commented

Ok, cool. Will check.

@dadhi sorry for bothering you, do you have any updates on this, can we some how help for investigation?

dadhi commented

I will look today, but no guarantee. Planned to do so anyway.

Thanks a mill!

dadhi commented

See #378 for why it is reopened.

dadhi commented

@zamaleev @ABatenev I have pushed the fix v4.0.1 to NuGet

thanks a mill @dadhi as always brilliant!