-
-
Couldn't load subscription status.
- Fork 91
Closed
Description
Hi! Awesome project, I tried to migrate DotVVM to this expression compiler and the performance figures are awesome. CompileFast is literally faster than .Compile(preferInterpretation: true) (of course, not counting the execution time)
However, I encountered few bugs, one of them can be replicated with this test:
delegate string Command();
[Test]
public void Bug3()
{
var p = Parameter(typeof(string), "vm");
var expr = Lambda<Func<string, Command>>(Lambda<Command>(p), p);
var ff = expr.Compile();
Assert.IsInstanceOf<Command>(ff(null));
var f = expr.CompileFast();
Assert.IsInstanceOf<Command>(f(null));
}
The fast expression always returns Func<string> even though it should return Command. If I don't use the parameter inside the lambda, it works correctly and returns Command