From d44d0f7b651cc432b75a774802789b46aa7bbcde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Standa=20Luke=C5=A1?= Date: Sat, 27 Jan 2024 11:15:06 +0100 Subject: [PATCH] Disable Linq.Expression preferInterpretation for bindings The interpreter is broken, it causes problems in #1742. The bug is reported in dotnet, without any response yet: https://github.com/dotnet/runtime/issues/96385 --- .../Framework/Binding/IExpressionToDelegateCompiler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Framework/Framework/Binding/IExpressionToDelegateCompiler.cs b/src/Framework/Framework/Binding/IExpressionToDelegateCompiler.cs index f51f245d82..badab03e1e 100644 --- a/src/Framework/Framework/Binding/IExpressionToDelegateCompiler.cs +++ b/src/Framework/Framework/Binding/IExpressionToDelegateCompiler.cs @@ -20,7 +20,8 @@ public DefaultExpressionToDelegateCompiler(DotvvmConfiguration config) interpret = config.Debug; } public Delegate Compile(LambdaExpression expression) => - interpret ? expression.Compile(preferInterpretation: interpret) : + // the interpreter is broken: https://github.com/dotnet/runtime/issues/96385 + // interpret ? expression.Compile(preferInterpretation: interpret) : expression.Compile(); // TODO: use FastExpressionCompiler // we can't do that atm since it still has some bugs, when these are fixed we should use that for all bindings