From caea6ca272f8530f6ba32f894752648c0ebe0d41 Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Thu, 25 May 2023 14:17:38 +0200 Subject: [PATCH] CallInstruction creation should respect IsDynamicCodeSupported --- .../src/System/Linq/Expressions/Interpreter/CallInstruction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/CallInstruction.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/CallInstruction.cs index 951f44a6c50f5e..5ab0cea57217b1 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/CallInstruction.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/CallInstruction.cs @@ -16,7 +16,7 @@ internal abstract partial class CallInstruction : Instruction /// public abstract int ArgumentCount { get; } - private static bool CanCreateArbitraryDelegates => true; + private static bool CanCreateArbitraryDelegates => RuntimeFeature.IsDynamicCodeSupported; #region Construction