From dc53474e2a98be12fe039d6cd05cf37018f39537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Fri, 26 Jun 2020 13:23:01 +0200 Subject: [PATCH] Fix bitrot in System.Linq.Expressions System.Linq.Expressions is not getting compiled without FEATURE_COMPILE so it started rotting. * Nullable annotations * Fix break introduced in #32768 --- .../src/System/Linq/Expressions/LambdaExpression.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs index 0e1ead78c1cb9c..4ffe972e166c8d 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs @@ -308,7 +308,7 @@ internal static Expression Create(Expression body, string? name, bool // Separate expression creation class to hide the CreateExpressionFunc function from users reflecting on Expression public class ExpressionCreator { - public static LambdaExpression CreateExpressionFunc(Expression body, string name, bool tailCall, ReadOnlyCollection parameters) + public static Expression CreateExpressionFunc(Expression body, string? name, bool tailCall, ReadOnlyCollection parameters) { if (name == null && !tailCall) { @@ -598,7 +598,7 @@ internal static LambdaExpression CreateLambda(Type delegateType, Expression body #if FEATURE_COMPILE MethodInfo create = typeof(Expression<>).MakeGenericType(delegateType).GetMethod("Create", BindingFlags.Static | BindingFlags.NonPublic)!; #else - MethodInfo create = typeof(ExpressionCreator<>).MakeGenericType(delegateType).GetMethod("CreateExpressionFunc", BindingFlags.Static | BindingFlags.Public); + MethodInfo create = typeof(ExpressionCreator<>).MakeGenericType(delegateType).GetMethod("CreateExpressionFunc", BindingFlags.Static | BindingFlags.Public)!; #endif if (delegateType.IsCollectible) {