diff --git a/src/libraries/System.Linq.Expressions/tests/Cast/AsNullable.cs b/src/libraries/System.Linq.Expressions/tests/Cast/AsNullable.cs index 444dbc7e64dc9d537a457ad15f03d685cbacc3f8..4449cd53f67964d9e13746956fb3ccf39bd6ad17 100644 --- a/src/libraries/System.Linq.Expressions/tests/Cast/AsNullable.cs +++ b/src/libraries/System.Linq.Expressions/tests/Cast/AsNullable.cs @@ -10,6 +10,13 @@ namespace System.Linq.Expressions.Tests { public static class AsNullableTests { + [Fact] + public static void NotLiftedEvenOnNullableOperandOrType() + { + Assert.False(Expression.TypeAs(Expression.Constant(E.A, typeof(E?)), typeof(E?)).IsLifted); + Assert.False(Expression.TypeAs(Expression.Constant(E.A, typeof(E?)), typeof(Enum)).IsLifted); + } + #region Test methods [Theory, ClassData(typeof(CompilationTypes))]