From c9a4b19e230df01cf4a360f8e6d02ccda0c96f83 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 06:54:50 +0000 Subject: [PATCH 1/7] Initial plan From 16bd44fff8925e85296b06609ea170c7e2e80a0c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:13:41 +0000 Subject: [PATCH 2/7] Add compile-time branch elimination for null/default equality in conditional expressions - Extend TryReduceConditional to eliminate branches when test is null/default equality - Add IsNullDefault helper to check if a type's default value is null - Add TryReduceConditional call in the emit phase as fallback for non-primitive comparisons - Add TryReduceConditional call in the collect phase to skip dead branch closure collection - Add tests covering null==Default, Default==null, Default==Default, and nullable cases Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/babb0376-0bd1-4f18-aaef-62de01a6b8f9 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com> --- .../FastExpressionCompiler.cs | 43 +++++- ...ical_expressions_during_the_compilation.cs | 129 ++++++++++++++++++ 2 files changed, 171 insertions(+), 1 deletion(-) diff --git a/src/FastExpressionCompiler/FastExpressionCompiler.cs b/src/FastExpressionCompiler/FastExpressionCompiler.cs index 24caf5dd..c9277bde 100644 --- a/src/FastExpressionCompiler/FastExpressionCompiler.cs +++ b/src/FastExpressionCompiler/FastExpressionCompiler.cs @@ -1508,6 +1508,15 @@ public static Result TryCollectInfo(ref ClosureInfo closure, Expression expr, } case ExpressionType.Conditional: var condExpr = (ConditionalExpression)expr; + // Try structural branch elimination - skip collecting dead branch info + { + var reducedCond = Tools.TryReduceConditional(condExpr); + if (!ReferenceEquals(reducedCond, condExpr)) + { + expr = reducedCond; + continue; + } + } if ((r = TryCollectInfo(ref closure, condExpr.Test, paramExprs, nestedLambda, ref rootNestedLambdas, flags)) != Result.OK || (r = TryCollectInfo(ref closure, condExpr.IfFalse, paramExprs, nestedLambda, ref rootNestedLambdas, flags)) != Result.OK) return r; @@ -2247,6 +2256,15 @@ public static bool TryEmit(Expression expr, expr = testIsTrue ? condExpr.IfTrue : condExpr.IfFalse; continue; // no recursion, just continue with the left or right side of condition } + // Try structural branch elimination (e.g., null == Default(X) → always true/false) + { + var reducedCond = Tools.TryReduceConditional(condExpr); + if (!ReferenceEquals(reducedCond, condExpr)) + { + expr = reducedCond; + continue; + } + } return TryEmitConditional(testExpr, condExpr.IfTrue, condExpr.IfFalse, paramExprs, il, ref closure, setup, parent); case ExpressionType.PostIncrementAssign: @@ -8591,7 +8609,9 @@ public static Expression TryReduceConditional(ConditionalExpression condExpr) var testExpr = TryReduceConditionalTest(condExpr.Test); if (testExpr is BinaryExpression bi && (bi.NodeType == ExpressionType.Equal || bi.NodeType == ExpressionType.NotEqual)) { - if (bi.Left is ConstantExpression lc && bi.Right is ConstantExpression rc) + var left = bi.Left; + var right = bi.Right; + if (left is ConstantExpression lc && right is ConstantExpression rc) { #if INTERPRETATION_DIAGNOSTICS Console.WriteLine("//Reduced Conditional in Interpretation: " + condExpr); @@ -8601,12 +8621,33 @@ public static Expression TryReduceConditional(ConditionalExpression condExpr) ? (equals ? condExpr.IfTrue : condExpr.IfFalse) : (equals ? condExpr.IfFalse: condExpr.IfTrue); } + + // Handle compile-time branch elimination for null/default equality: + // e.g. Constant(null) == Default(typeof(X)) or Default(typeof(X)) == Constant(null) + // where X is a reference, interface, or nullable type - both represent null, so they are always equal + var leftIsNull = left is ConstantExpression lnc && lnc.Value == null || + left is DefaultExpression lde && IsNullDefault(lde.Type); + var rightIsNull = right is ConstantExpression rnc && rnc.Value == null || + right is DefaultExpression rde && IsNullDefault(rde.Type); + if (leftIsNull && rightIsNull) + { +#if INTERPRETATION_DIAGNOSTICS + Console.WriteLine("//Reduced Conditional (null/default equality) in Interpretation: " + condExpr); +#endif + // both sides represent null, so they are equal + return bi.NodeType == ExpressionType.Equal ? condExpr.IfTrue : condExpr.IfFalse; + } } return testExpr is ConstantExpression constExpr && constExpr.Value is bool testBool ? (testBool ? condExpr.IfTrue : condExpr.IfFalse) : condExpr; } + + // Returns true if the type's default value is null (reference types, interfaces, and Nullable) + [MethodImpl((MethodImplOptions)256)] + internal static bool IsNullDefault(Type type) => + type.IsClass || type.IsInterface || Nullable.GetUnderlyingType(type) != null; } [RequiresUnreferencedCode(Trimming.Message)] diff --git a/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs b/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs index 4eaf22a8..f7a5d03d 100644 --- a/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs +++ b/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs @@ -16,6 +16,12 @@ public void Run(TestRun t) { Logical_expression_started_with_not_Without_Interpreter_due_param_use(t); Logical_expression_started_with_not(t); + Condition_with_null_constant_equal_to_default_of_class_type_is_eliminated(t); + Condition_with_default_class_type_equal_to_null_constant_is_eliminated(t); + Condition_with_two_defaults_of_class_type_is_eliminated(t); + Condition_with_not_equal_null_and_default_of_class_type_is_eliminated(t); + Condition_with_nullable_default_equal_to_null_is_eliminated(t); + Condition_with_null_constant_equal_to_non_null_constant_is_not_eliminated(t); } public void Logical_expression_started_with_not(TestContext t) @@ -58,4 +64,127 @@ public void Logical_expression_started_with_not_Without_Interpreter_due_param_us t.IsFalse(ff(true)); t.IsTrue(ff(false)); } + + // Branch elimination: Constant(null) == Default(typeof(X)) where X is a class → always true + // Models the AutoMapper pattern: after inlining a null argument into a null-check lambda + public void Condition_with_null_constant_equal_to_default_of_class_type_is_eliminated(TestContext t) + { + // Condition(Equal(Constant(null), Default(typeof(string))), Constant("trueBranch"), Constant("falseBranch")) + // Since null == default(string) is always true, this should reduce to "trueBranch" + var expr = Lambda>( + Condition( + Equal(Constant(null, typeof(string)), Default(typeof(string))), + Constant("trueBranch"), + Constant("falseBranch"))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual("trueBranch", fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual("trueBranch", ff()); + } + + // Branch elimination: Default(typeof(X)) == Constant(null) where X is a class → always true (symmetric) + public void Condition_with_default_class_type_equal_to_null_constant_is_eliminated(TestContext t) + { + var expr = Lambda>( + Condition( + Equal(Default(typeof(string)), Constant(null, typeof(string))), + Constant("trueBranch"), + Constant("falseBranch"))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual("trueBranch", fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual("trueBranch", ff()); + } + + // Branch elimination: Default(typeof(X)) == Default(typeof(X)) where X is a class → always true + public void Condition_with_two_defaults_of_class_type_is_eliminated(TestContext t) + { + var expr = Lambda>( + Condition( + Equal(Default(typeof(string)), Default(typeof(string))), + Constant("trueBranch"), + Constant("falseBranch"))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual("trueBranch", fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual("trueBranch", ff()); + } + + // Branch elimination: Constant(null) != Default(typeof(X)) where X is a class → always false + public void Condition_with_not_equal_null_and_default_of_class_type_is_eliminated(TestContext t) + { + var expr = Lambda>( + Condition( + NotEqual(Constant(null, typeof(string)), Default(typeof(string))), + Constant("trueBranch"), + Constant("falseBranch"))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual("falseBranch", fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual("falseBranch", ff()); + } + + // Branch elimination: Constant(null) == Default(typeof(int?)) → always true (null == default(int?) is null == null) + public void Condition_with_nullable_default_equal_to_null_is_eliminated(TestContext t) + { + var expr = Lambda>( + Condition( + Equal(Constant(null, typeof(int?)), Default(typeof(int?))), + Constant(42, typeof(int?)), + Constant(0, typeof(int?)))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual(42, fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual(42, ff()); + } + + // Sanity check: Constant(null) == Constant("hello") should NOT be eliminated (false, not a null-null case) + public void Condition_with_null_constant_equal_to_non_null_constant_is_not_eliminated(TestContext t) + { + var expr = Lambda>( + Condition( + Equal(Constant(null, typeof(string)), Constant("hello", typeof(string))), + Constant("trueBranch"), + Constant("falseBranch"))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual("falseBranch", fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual("falseBranch", ff()); + } } \ No newline at end of file From d4423e8735e4595df0293dea37902f92b5079fbc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 08:01:07 +0000 Subject: [PATCH 3/7] Add switch branch elimination (#489): TryFindSwitchBranch in Interpreter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Interpreter.TryFindSwitchBranch: detects constant/interpretable switch values and returns the matching case body, eliminating dead case branches at compile time - Supports integer/enum/char (constant + arithmetic via TryInterpretInt) and string - Wire into both collect phase (skips dead branch closure collection) and emit phase - Refactor: move ConvertValueObjectToLong from private EmittingVisitor to internal Interpreter - Add PValueToLong helper in Interpreter for PValue → long conversion - Add 5 tests: int, string, enum, no-match→default, interpreted arithmetic switch values Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/a41fbeeb-293f-421d-93ad-a1b8351344ee Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com> --- .../FastExpressionCompiler.cs | 148 +++++++++++++++--- ...ical_expressions_during_the_compilation.cs | 113 +++++++++++++ 2 files changed, 241 insertions(+), 20 deletions(-) diff --git a/src/FastExpressionCompiler/FastExpressionCompiler.cs b/src/FastExpressionCompiler/FastExpressionCompiler.cs index c9277bde..8c017e77 100644 --- a/src/FastExpressionCompiler/FastExpressionCompiler.cs +++ b/src/FastExpressionCompiler/FastExpressionCompiler.cs @@ -1613,6 +1613,16 @@ public static Result TryCollectInfo(ref ClosureInfo closure, Expression expr, case ExpressionType.Switch: var switchExpr = ((SwitchExpression)expr); + // Compile-time switch branch elimination (#489): if switch value is interpretable, collect only the matching branch + if (Interpreter.TryFindSwitchBranch(switchExpr, flags, out var switchMatchedBody)) + { + if (switchMatchedBody != null) + { + expr = switchMatchedBody; + continue; + } + return r; // no matched body and no default → nothing to collect + } if ((r = TryCollectInfo(ref closure, switchExpr.SwitchValue, paramExprs, nestedLambda, ref rootNestedLambdas, flags)) != Result.OK || switchExpr.DefaultBody != null && // todo: @check is the order of collection affects the result? (r = TryCollectInfo(ref closure, switchExpr.DefaultBody, paramExprs, nestedLambda, ref rootNestedLambdas, flags)) != Result.OK) @@ -5397,25 +5407,8 @@ private struct TestValueAndMultiTestCaseIndex public int MultiTestValCaseBodyIdxPlusOne; // 0 means not multi-test case, otherwise index+1 } - private static long ConvertValueObjectToLong(object valObj) - { - Debug.Assert(valObj != null); - var type = valObj.GetType(); - type = type.IsEnum ? Enum.GetUnderlyingType(type) : type; - return Type.GetTypeCode(type) switch - { - TypeCode.Char => (long)(char)valObj, - TypeCode.SByte => (long)(sbyte)valObj, - TypeCode.Byte => (long)(byte)valObj, - TypeCode.Int16 => (long)(short)valObj, - TypeCode.UInt16 => (long)(ushort)valObj, - TypeCode.Int32 => (long)(int)valObj, - TypeCode.UInt32 => (long)(uint)valObj, - TypeCode.Int64 => (long)valObj, - TypeCode.UInt64 => (long)(ulong)valObj, - _ => 0 // unreachable - }; - } + private static long ConvertValueObjectToLong(object valObj) => + Interpreter.ConvertValueObjectToLong(valObj); #if LIGHT_EXPRESSION private static bool TryEmitSwitch(SwitchExpression expr, IParameterProvider paramExprs, ILGenerator il, ref ClosureInfo closure, @@ -5431,6 +5424,10 @@ private static bool TryEmitSwitch(SwitchExpression expr, IReadOnlyList param var caseCount = cases.Count; var defaultBody = expr.DefaultBody; + // Compile-time switch branch elimination (#489): if the switch value is interpretable, select the matching branch + if (Interpreter.TryFindSwitchBranch(expr, setup, out var matchedBody)) + return matchedBody == null || TryEmit(matchedBody, paramExprs, il, ref closure, setup, parent); + // Optimization for the single case if (caseCount == 1 & defaultBody != null) { @@ -7231,6 +7228,28 @@ internal static bool TryUnboxToPrimitiveValue(ref PValue value, object boxedValu _ => UnreachableCase(code, (object)null) }; + /// Converts an integer/enum/char boxed value to long for uniform comparison. + [MethodImpl((MethodImplOptions)256)] + internal static long ConvertValueObjectToLong(object valObj) + { + Debug.Assert(valObj != null); + var type = valObj.GetType(); + type = type.IsEnum ? Enum.GetUnderlyingType(type) : type; + return Type.GetTypeCode(type) switch + { + TypeCode.Char => (long)(char)valObj, + TypeCode.SByte => (long)(sbyte)valObj, + TypeCode.Byte => (long)(byte)valObj, + TypeCode.Int16 => (long)(short)valObj, + TypeCode.UInt16 => (long)(ushort)valObj, + TypeCode.Int32 => (long)(int)valObj, + TypeCode.UInt32 => (long)(uint)valObj, + TypeCode.Int64 => (long)valObj, + TypeCode.UInt64 => (long)(ulong)valObj, + _ => 0 // unreachable + }; + } + internal static bool ComparePrimitiveValues(ref PValue left, ref PValue right, TypeCode code, ExpressionType nodeType) { switch (nodeType) @@ -7563,7 +7582,7 @@ public static bool TryInterpretBool(out bool result, Expression expr, CompilerFl { var exprType = expr.Type; Debug.Assert(exprType.IsPrimitive, // todo: @feat nullables are not supported yet // || Nullable.GetUnderlyingType(exprType)?.IsPrimitive == true, - "Can only reduce the boolean for the expressions of primitive types but found " + expr.Type); + "Can only reduce the boolean for the expressions of primitive type but found " + expr.Type); result = false; if ((flags & CompilerFlags.DisableInterpreter) != 0) return false; @@ -7582,6 +7601,95 @@ public static bool TryInterpretBool(out bool result, Expression expr, CompilerFl } } + /// + /// Tries to determine at compile time which branch a switch expression will take. + /// Works for integer/enum and string switch values with no custom equality method. + /// Returns true when the switch value is deterministic; is set to + /// the branch body to emit (null means use default body which may itself be null). + /// + public static bool TryFindSwitchBranch(SwitchExpression switchExpr, CompilerFlags flags, out Expression matchedBody) + { + matchedBody = null; + if (switchExpr.Comparison != null) return false; // custom equality: can't interpret statically + if ((flags & CompilerFlags.DisableInterpreter) != 0) return false; + var switchValueExpr = switchExpr.SwitchValue; + var switchValueType = switchValueExpr.Type; + var cases = switchExpr.Cases; + try + { + // String switch: only constant switch values supported + if (switchValueType == typeof(string)) + { + if (switchValueExpr is not ConstantExpression ce) return false; + var switchStr = ce.Value; + for (var i = 0; i < cases.Count; i++) + { + var testValues = cases[i].TestValues; + for (var j = 0; j < testValues.Count; j++) + { + if (testValues[j] is not ConstantExpression testConst) return false; + if (Equals(switchStr, testConst.Value)) { matchedBody = cases[i].Body; return true; } + } + } + matchedBody = switchExpr.DefaultBody; + return true; + } + + // Integer / enum / char switch + var effectiveType = switchValueType.IsEnum ? Enum.GetUnderlyingType(switchValueType) : switchValueType; + var typeCode = Type.GetTypeCode(effectiveType); + if (typeCode < TypeCode.Char || typeCode > TypeCode.UInt64) return false; // non-integral (e.g. float, decimal) + + long switchValLong; + if (switchValueExpr is ConstantExpression switchConst && switchConst.Value != null) + switchValLong = ConvertValueObjectToLong(switchConst.Value); + else if (typeCode == TypeCode.Int32) + { + var intVal = 0; + if (!TryInterpretInt(ref intVal, switchValueExpr, switchValueExpr.NodeType)) return false; + switchValLong = intVal; + } + else + { + PValue pv = default; + if (!TryInterpretPrimitiveValue(ref pv, switchValueExpr, typeCode, switchValueExpr.NodeType)) return false; + switchValLong = PValueToLong(ref pv, typeCode); + } + + for (var i = 0; i < cases.Count; i++) + { + var testValues = cases[i].TestValues; + for (var j = 0; j < testValues.Count; j++) + { + if (testValues[j] is not ConstantExpression testConst || testConst.Value == null) continue; + if (switchValLong == ConvertValueObjectToLong(testConst.Value)) { matchedBody = cases[i].Body; return true; } + } + } + matchedBody = switchExpr.DefaultBody; + return true; + } + catch + { + return false; + } + } + + /// Converts a union to a long for integer/char comparison. + [MethodImpl((MethodImplOptions)256)] + internal static long PValueToLong(ref PValue value, TypeCode code) => code switch + { + TypeCode.Char => (long)value.CharValue, + TypeCode.SByte => (long)value.SByteValue, + TypeCode.Byte => (long)value.ByteValue, + TypeCode.Int16 => (long)value.Int16Value, + TypeCode.UInt16 => (long)value.UInt16Value, + TypeCode.Int32 => (long)value.Int32Value, + TypeCode.UInt32 => (long)value.UInt32Value, + TypeCode.Int64 => value.Int64Value, + TypeCode.UInt64 => (long)value.UInt64Value, + _ => 0L, + }; + // todo: @perf try split to `TryInterpretBinary` overload to streamline the calls for TryEmitConditional and similar /// Tries to interpret the expression of the Primitive type of Constant, Convert, Logical, Comparison, Arithmetic. internal static bool TryInterpretBool(ref bool resultBool, Expression expr, ExpressionType nodeType) diff --git a/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs b/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs index f7a5d03d..e8a8dc54 100644 --- a/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs +++ b/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs @@ -22,6 +22,11 @@ public void Run(TestRun t) Condition_with_not_equal_null_and_default_of_class_type_is_eliminated(t); Condition_with_nullable_default_equal_to_null_is_eliminated(t); Condition_with_null_constant_equal_to_non_null_constant_is_not_eliminated(t); + Switch_with_constant_int_value_eliminates_dead_cases(t); + Switch_with_constant_string_value_eliminates_dead_cases(t); + Switch_with_constant_enum_value_eliminates_dead_cases(t); + Switch_with_constant_int_matching_no_case_falls_through_to_default(t); + Switch_with_interpreted_int_expression_eliminates_dead_cases(t); } public void Logical_expression_started_with_not(TestContext t) @@ -187,4 +192,112 @@ public void Condition_with_null_constant_equal_to_non_null_constant_is_not_elimi ff.PrintIL(); t.AreEqual("falseBranch", ff()); } + + // Switch branch elimination (#489): constant int switch value selects single case + public void Switch_with_constant_int_value_eliminates_dead_cases(TestContext t) + { + // Switch(Constant(2), default:"Z", case 1:"A", case 2:"B", case 5:"C") + // The switch value is a constant 2, so it should reduce to "B" + var expr = Lambda>( + Switch(Constant(2), + Constant("Z"), + SwitchCase(Constant("A"), Constant(1)), + SwitchCase(Constant("B"), Constant(2)), + SwitchCase(Constant("C"), Constant(5)))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual("B", fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual("B", ff()); + } + + // Switch branch elimination (#489): constant string switch value selects single case + public void Switch_with_constant_string_value_eliminates_dead_cases(TestContext t) + { + var expr = Lambda>( + Switch(Constant("hello"), + Constant("unknown"), + SwitchCase(Constant("hit_hello"), Constant("hello")), + SwitchCase(Constant("hit_world"), Constant("world")))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual("hit_hello", fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual("hit_hello", ff()); + } + + public enum Color { Red, Green, Blue } + + // Switch branch elimination (#489): constant enum switch value selects single case + public void Switch_with_constant_enum_value_eliminates_dead_cases(TestContext t) + { + var expr = Lambda>( + Switch(Constant(Color.Green), + Constant("unknown"), + SwitchCase(Constant("red"), Constant(Color.Red)), + SwitchCase(Constant("green"), Constant(Color.Green)), + SwitchCase(Constant("blue"), Constant(Color.Blue)))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual("green", fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual("green", ff()); + } + + // Switch branch elimination (#489): constant int matches no case → default is emitted + public void Switch_with_constant_int_matching_no_case_falls_through_to_default(TestContext t) + { + var expr = Lambda>( + Switch(Constant(99), + Constant("default"), + SwitchCase(Constant("A"), Constant(1)), + SwitchCase(Constant("B"), Constant(2)))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual("default", fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual("default", ff()); + } + + // Switch branch elimination (#489): computed int (arithmetic on constants) selects case + public void Switch_with_interpreted_int_expression_eliminates_dead_cases(TestContext t) + { + // Switch(1 + 4, ...) → Switch(5, ...) → "C" + var expr = Lambda>( + Switch(Add(Constant(1), Constant(4)), + Constant("Z"), + SwitchCase(Constant("A"), Constant(1)), + SwitchCase(Constant("B"), Constant(2)), + SwitchCase(Constant("C"), Constant(5)))); + + expr.PrintCSharp(); + + var fs = expr.CompileSys(); + fs.PrintIL(); + t.AreEqual("C", fs()); + + var ff = expr.CompileFast(false); + ff.PrintIL(); + t.AreEqual("C", ff()); + } } \ No newline at end of file From 05d5008e8a62a2e7fb58eb142cadd88b7cfa3b17 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 08:20:26 +0000 Subject: [PATCH 4/7] Add switch branch-elimination benchmarks (Issue #489) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New Issue489_Switch_BranchElimination.cs with Compile and Invoke nested classes: - Baseline: Switch(Parameter(...), ...) — runtime value, no FEC branch elimination - Eliminated: Switch(Constant(2), ...) — constant value, FEC emits only matching branch - Both registered in Program.cs (commented-out as per existing convention) Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/03a3da65-f598-4c66-90ce-0545d43edc04 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com> --- .../Issue489_Switch_BranchElimination.cs | 148 ++++++++++++++++++ .../Program.cs | 3 + 2 files changed, 151 insertions(+) create mode 100644 test/FastExpressionCompiler.Benchmarks/Issue489_Switch_BranchElimination.cs diff --git a/test/FastExpressionCompiler.Benchmarks/Issue489_Switch_BranchElimination.cs b/test/FastExpressionCompiler.Benchmarks/Issue489_Switch_BranchElimination.cs new file mode 100644 index 00000000..92f45dba --- /dev/null +++ b/test/FastExpressionCompiler.Benchmarks/Issue489_Switch_BranchElimination.cs @@ -0,0 +1,148 @@ +using System; +using System.Linq.Expressions; +using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Order; + +namespace FastExpressionCompiler.Benchmarks; + +/// +/// Benchmarks for compile-time switch branch elimination introduced in #489. +/// +/// Two variants are compared: +/// - Baseline: Switch value is a runtime parameter — FEC cannot eliminate any branches. +/// - Eliminated: Switch value is a compile-time constant — FEC selects the single matching +/// branch and emits only that, skipping closure collection and IL for all others. +/// +/// Each variant has two nested classes: +/// - Compile: measures how fast `Compile()` / `CompileFast()` process the expression. +/// - Invoke: measures the execution speed of the resulting delegate. +/// +/// The Invoke benchmark is the most telling: the eliminated switch emits just +/// `ldstr "B" / ret` (2 IL instructions) vs the full switch table. +/// +public class Issue489_Switch_BranchElimination +{ + // ----------------------------------------------------------------- + // Shared expression factories + // ----------------------------------------------------------------- + + /// + /// Baseline: the switch value is a runtime parameter — no elimination possible. + /// switch (x) { case 1: "A"; case 2: "B"; case 5: "C"; default: "Z" } + /// + private static Expression> CreateExpr_Baseline() + { + var p = Expression.Parameter(typeof(int), "x"); + return Expression.Lambda>( + Expression.Switch(p, + Expression.Constant("Z"), + Expression.SwitchCase(Expression.Constant("A"), Expression.Constant(1)), + Expression.SwitchCase(Expression.Constant("B"), Expression.Constant(2)), + Expression.SwitchCase(Expression.Constant("C"), Expression.Constant(5))), + p); + } + + /// + /// Branch-eliminated: the switch value is the compile-time constant 2. + /// switch (2) { case 1: "A"; case 2: "B"; case 5: "C"; default: "Z" } + /// FEC reduces this to a single ldstr "B" / ret. + /// + private static Expression> CreateExpr_Eliminated() + { + return Expression.Lambda>( + Expression.Switch(Expression.Constant(2), + Expression.Constant("Z"), + Expression.SwitchCase(Expression.Constant("A"), Expression.Constant(1)), + Expression.SwitchCase(Expression.Constant("B"), Expression.Constant(2)), + Expression.SwitchCase(Expression.Constant("C"), Expression.Constant(5)))); + } + + // ----------------------------------------------------------------- + // Compilation benchmarks + // ----------------------------------------------------------------- + + /// + /// Measures how fast Compile / CompileFast process each expression variant. + /// Baseline: runtime parameter switch (no FEC branch elimination). + /// Eliminated: constant switch (FEC skips dead branch closure-collection and IL emission). + /// + [MemoryDiagnoser, RankColumn, Orderer(SummaryOrderPolicy.FastestToSlowest)] + public class Compile + { + /* + ## Results placeholder — run with: dotnet run -c Release --project test/FastExpressionCompiler.Benchmarks -- --filter *Issue489*Compile* + + | Method | Mean | Error | StdDev | Ratio | Rank | Allocated | + |----------------------------- |----------:|---------:|---------:|------:|-----:|----------:| + | Baseline_CompileFast | N/A | N/A | N/A | | | N/A | + | Baseline_Compile | N/A | N/A | N/A | | | N/A | + | Eliminated_CompileFast | N/A | N/A | N/A | | | N/A | + | Eliminated_Compile | N/A | N/A | N/A | | | N/A | + */ + + private static readonly Expression> _baseline = CreateExpr_Baseline(); + private static readonly Expression> _eliminated = CreateExpr_Eliminated(); + + [Benchmark(Baseline = true)] + public object Baseline_Compile() => _baseline.Compile(); + + [Benchmark] + public object Baseline_CompileFast() => _baseline.CompileFast(); + + [Benchmark] + public object Eliminated_Compile() => _eliminated.Compile(); + + [Benchmark] + public object Eliminated_CompileFast() => _eliminated.CompileFast(); + } + + // ----------------------------------------------------------------- + // Invocation benchmarks + // ----------------------------------------------------------------- + + /// + /// Measures invocation speed of the compiled delegates. + /// The eliminated FEC delegate emits only 2 IL instructions (ldstr + ret), + /// while the system-compiled one runs a full switch dispatch at runtime. + /// + [MemoryDiagnoser, RankColumn, Orderer(SummaryOrderPolicy.FastestToSlowest)] + public class Invoke + { + /* + ## Results placeholder — run with: dotnet run -c Release --project test/FastExpressionCompiler.Benchmarks -- --filter *Issue489*Invoke* + + | Method | Mean | Error | StdDev | Ratio | Rank | Allocated | + |-------------------------------- |-----:|------:|-------:|------:|-----:|----------:| + | Baseline_Compiled | N/A | N/A | N/A | | | N/A | + | Baseline_CompiledFast | N/A | N/A | N/A | | | N/A | + | Eliminated_Compiled | N/A | N/A | N/A | | | N/A | + | Eliminated_CompiledFast | N/A | N/A | N/A | | | N/A | + */ + + private Func _baselineCompiled; + private Func _baselineCompiledFast; + private Func _eliminatedCompiled; + private Func _eliminatedCompiledFast; + + [GlobalSetup] + public void Setup() + { + _baselineCompiled = CreateExpr_Baseline().Compile(); + _baselineCompiledFast = CreateExpr_Baseline().CompileFast(); + _eliminatedCompiled = CreateExpr_Eliminated().Compile(); + _eliminatedCompiledFast = CreateExpr_Eliminated().CompileFast(); + } + + [Benchmark(Baseline = true)] + public string Baseline_Compiled() => _baselineCompiled(2); + + [Benchmark] + public string Baseline_CompiledFast() => _baselineCompiledFast(2); + + [Benchmark] + public string Eliminated_Compiled() => _eliminatedCompiled(); + + [Benchmark] + public string Eliminated_CompiledFast() => _eliminatedCompiledFast(); + } +} diff --git a/test/FastExpressionCompiler.Benchmarks/Program.cs b/test/FastExpressionCompiler.Benchmarks/Program.cs index b00d5c60..0e7d8fd3 100644 --- a/test/FastExpressionCompiler.Benchmarks/Program.cs +++ b/test/FastExpressionCompiler.Benchmarks/Program.cs @@ -50,6 +50,9 @@ public static void Main() //BenchmarkRunner.Run(); //BenchmarkRunner.Run(); + // BenchmarkRunner.Run(); + // BenchmarkRunner.Run(); + BenchmarkRunner.Run(); // BenchmarkRunner.Run(); // BenchmarkRunner.Run(); From cbf2a73b3c0886f523974dfc79011aae7636afd0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 21:18:21 +0000 Subject: [PATCH 5/7] Merge origin/master: resolve conflicts in FastExpressionCompiler.cs Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/1b1b9366-ec20-4272-8d18-ec918c19bb65 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com> --- .gitignore | 2 +- printcs_20260413-01.out | 9005 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 9006 insertions(+), 1 deletion(-) create mode 100644 printcs_20260413-01.out diff --git a/.gitignore b/.gitignore index f073e246..f4da823c 100644 --- a/.gitignore +++ b/.gitignore @@ -257,4 +257,4 @@ ApiKey.txt FastExpressionCompiler.Internal/ # Scala Metals in VSCode -metals.* \ No newline at end of file +metals.**.out diff --git a/printcs_20260413-01.out b/printcs_20260413-01.out new file mode 100644 index 00000000..3eab182f --- /dev/null +++ b/printcs_20260413-01.out @@ -0,0 +1,9005 @@ + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.Quicksort_partition_with_nested_loops +var _ = (Action)(( + int[] arr, + int low, + int high) => //void +{ + int i = default; + int j = default; + int pivot = default; + int temp = default; + int compareResult = default; + i = low; + j = high; + pivot = arr[(i + j) / 2]; + while (true) + { + if (i > j) + { + goto endMain; + } + while (true) + { + continue1:; + compareResult = arr[i].CompareTo(pivot); + if (compareResult == -1) + { + i++; + goto continue1; + } + goto endSub1; + } + endSub1:; + while (true) + { + continue2:; + compareResult = pivot.CompareTo(arr[j]); + if (compareResult == -1) + { + j--; + goto continue2; + } + goto endSub2; + } + endSub2:; + if (i <= j) + { + temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + i++; + j--; + } + } + endMain:; +}); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.Comparison_function_with_goto_labels +var _ = (Func)(( + int left, + int right) => //int +{ + int compareResult = default; + compareResult = left.CompareTo(right); + compareResult = -compareResult; + if (compareResult == -1) + { + return -1; + } + return 1; +}); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_NullableInt_ArrayAccessError +var _ = (Func[]>, int?>)((List[]> dataArrayList) => //int? +{ + int left_ListIndex = default; + int left_ArrayIndex = default; + int? left_0 = null; + left_ListIndex = 0; + left_ArrayIndex = 0; + left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; + endMain:; + return left_0; +}); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_Int_ArrayAccessError +var _ = (Func, int>)((List dataArrayList) => //int +{ + int left_ListIndex = default; + int left_ArrayIndex = default; + int left_0 = default; + left_ListIndex = 0; + left_ArrayIndex = 0; + left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; + endMain:; + return left_0; +}); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_String_ArrayAccessError +var _ = (Func, string>)((List dataArrayList) => //string +{ + int left_ListIndex = default; + int left_ArrayIndex = default; + string left_0 = null; + left_ListIndex = 0; + left_ArrayIndex = 0; + left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; + endMain:; + return left_0; +}); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_Struct_ArrayAccess +var _ = (Func, int?>)((List dataArrayList) => //int? +{ + int left_ListIndex = default; + int left_ArrayIndex = default; + int? left_0 = null; + left_ListIndex = 0; + left_ArrayIndex = 0; + left_0 = dataArrayList[left_ListIndex][left_ArrayIndex].Foo; + endMain:; + return left_0; +}); + +//Issue498_InvalidProgramException_when_using_loop.Original_test +var _ = (Func)(() => //int +{ + int result = default; + int x = default; + while (true) + { + while (true) + { + continue1:; + if (x >= 10) + { + return result; + } + result += 1; + x += 1; + } + endSub1:; + } + endMain:; +}); + +//Issue495_Incomplete_pattern_detection_for_NotSupported_1007_Return_goto_from_TryCatch_with_Assign_generates_invalid_IL.ReturnGotoFromTryCatchWithAssign_ShouldBeDetectedAsError1007 +var _ = (Func)(() => //object +{ + object @var = null; + object finalResult = null; + try + { + @var = "hello"; + if (@var != null) + { + return finalResult = @var; + } + finalResult = "default"; + @return:; + } + catch (Exception ex) + { + ; + } + return finalResult; +}); + +//Issue495_Incomplete_pattern_detection_for_NotSupported_1007_Return_goto_from_TryCatch_with_Assign_generates_invalid_IL.ReturnGotoFromTryCatchWithAssign_ShouldBeDetectedAsError1007_null_path +var _ = (Func)(() => //object +{ + object @var = null; + object finalResult = null; + try + { + @var = null; + if (@var != null) + { + return finalResult = @var; + } + finalResult = "default"; + @return:; + } + catch (Exception ex) + { + ; + } + return finalResult; +}); + +//Issue480_Issue480_CLR_detected_an_invalid_program_exception.Reduced_conditional_emit +var _ = (Func)((bool input) => //object + (object)(((true) ? input : true) || ((true) ? input : false))); + +//Issue480_Issue480_CLR_detected_an_invalid_program_exception.Modified_case +var _ = (Func)(() => //object + (object)(((true) ? (bool?)null : (bool?)null) || ((true) ? (bool?)true : (bool?)null))); + +//Issue480_Issue480_CLR_detected_an_invalid_program_exception.Original_case +var _ = (Func)(() => //object + (object)(((true) ? (bool?)null : (bool?)null) || ((true) ? (bool?)null : (bool?)null))); + +//Issue480_Issue480_CLR_detected_an_invalid_program_exception.Reduced_conditional_interpretation +var _ = (Func)(() => //object + (object)(((true) ? false : true) || ((true) ? true : false))); + +//Issue487_Fix_ToCSharpString_output_for_boolean_equality_expressions.Original_case +var _ = x.MyTestBool; + +//Issue490_Regression_in_compiling_lambdas_with_ref_struct_parameters.Return_true_when_token_is_null +var _ = (RefStructReaderDelegate)((ref MyJsonReader reader) => //bool + (reader.TokenType == MyJsonTokenType.Null) ? true : false); + +//Issue490_Regression_in_compiling_lambdas_with_ref_struct_parameters.Return_false_when_token_is_not_null +var _ = (RefStructReaderDelegate)((ref MyJsonReader reader) => //bool + (reader.TokenType == MyJsonTokenType.Null) ? true : false); + +//Issue490_Regression_in_compiling_lambdas_with_ref_struct_parameters.Original_case +var _ = (TestDelegate)((ref Utf8JsonReader utf8JsonReader_0) => //int + (utf8JsonReader_0.TokenType == JsonTokenType.Null) ? default(int) : + utf8JsonReader_0.GetInt32()); + +//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_with_first_and_last_outliers +var _ = (Func)((int int_0) => //int +{ + switch (int_0) + { + case 3: + case -10: + return -3; + case 5: + case 4: + return 4; + case 6: + return 6; + case 7: + return 7; + case 20: + return 20; + default: + return -1; + } +}); + +//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_the_bytes_two_ranges_NOT_SUPPORTED_YET +var _ = (Func)((sbyte sbyte_0) => //int +{ + switch (sbyte_0) + { + case (sbyte)3: + return 3; + case (sbyte)4: + return 4; + case (sbyte)5: + return 5; + case (sbyte)6: + return 6; + case (sbyte)15: + return 15; + case (sbyte)16: + return 16; + case (sbyte)17: + return 17; + case (sbyte)18: + return 18; + default: + return -1; + } +}); + +//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_the_long +var _ = (Func)((long long_0) => //long +{ + switch (long_0) + { + case (long)1: + return (long)1; + case (long)3: + return (long)3; + case (long)4: + return (long)4; + case (long)5: + return (long)5; + case (long)6: + return (long)6; + case (long)8: + return (long)8; + default: + return (long)-1; + } +}); + +//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_minimal_number_of_cases_enabling_OpCodesSwitch_and_no_default_case +var _ = (Func)((int int_0) => //int +{ + switch (int_0) + { + case 0: + int_0 = 42; + break; + case 3: + case 1: + int_0 = 31; + break; + case 2: + int_0 = 2; + break; + case 6: + case 7: + int_0 = 67; + break; + } + return int_0; +}); + +//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_all_integer_cases_starting_from_0 +var _ = (Func)((int int_0) => //int +{ + switch (int_0) + { + case 0: + return 0; + case 1: + return 1; + case 4: + case 3: + return 3; + case 6: + return 6; + case 5: + return 5; + default: + return -1; + } +}); + +//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_the_bytes +var _ = (Func)((sbyte sbyte_0) => //int +{ + switch (sbyte_0) + { + case (sbyte)-3: + return -3; + case (sbyte)3: + return 3; + case (sbyte)4: + return 4; + case (sbyte)5: + return 5; + case (sbyte)6: + return 6; + case (sbyte)12: + return 12; + default: + return -1; + } +}); + +//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_the_enums +var _ = (Func)((IntEnum intEnum_0) => //int +{ + switch (intEnum_0) + { + case IntEnum.One: + return 1; + case IntEnum.Three: + return 3; + case IntEnum.Four: + return 4; + case IntEnum.Five: + return 5; + case IntEnum.Six: + return 6; + default: + return -1; + } +}); + +//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_integer_cases_starting_from_Not_0 +var _ = (Func)((int int_0) => //int +{ + switch (int_0) + { + case 1: + return 1; + case 3: + return 3; + case 4: + return 4; + case 5: + return 5; + case 6: + return 6; + default: + return -1; + } +}); + +//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_nullable_integer_types +var _ = (Func)((int? int__0) => //int +{ + switch (int__0) + { + case (int?)null: + return 0; + case (int?)0: + return 0; + case (int?)1: + return 1; + case (int?)2: + return 2; + case (int?)3: + return 3; + case (int?)4: + return 4; + case (int?)5: + return 5; + default: + return -1; + } +}); + +//Issue468_Optimize_the_delegate_access_to_the_Closure_object_for_the_modern_NET.Original_expression +var _ = (Func)(() => //bool + ((1 + 2) == (5 + -2)) == (42 == 42)); + +//Issue468_Optimize_the_delegate_access_to_the_Closure_object_for_the_modern_NET.Original_expression_with_closure +var _ = (Func)(() => //bool + ((1 + 2) == (5 + -2)) == (42 == default(ValueRef)/*NOTE: Provide the non-default value for the Constant!*/.Value)); + +//Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.Logical_expression_started_with_not_Without_Interpreter_due_param_use +var _ = (Func)((bool p) => //bool + !(true && p)); + +//Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.Logical_expression_started_with_not +var _ = (Func)((bool p) => //bool + !((true && false)) || p); + +//Issue473_InvalidProgramException_when_using_Expression_Condition_with_converted_decimal_expression.Original_case +var _ = (Func)(() => //Decimal + (((Decimal)0) == default(Decimal)) ? 3m : + ((Decimal)0) * 3m); + +//Issue476_System_ExecutionEngineException_with_nullables_on_repeated_calls_to_ConcurrentDictionary.Original_case +var _ = (Func)((Record @record) => //bool + @record.Timestamp != (DateTimeOffset?)null); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.Quicksort_partition_with_nested_loops +var _ = (Action)(( + int[] arr, + int low, + int high) => //void +{ + int i = default; + int j = default; + int pivot = default; + int temp = default; + int compareResult = default; + i = low; + j = high; + pivot = arr[(i + j) / 2]; + while (true) + { + if (i > j) + { + goto endMain; + } + while (true) + { + continue1:; + compareResult = arr[i].CompareTo(pivot); + if (compareResult == -1) + { + i++; + goto continue1; + } + goto endSub1; + } + endSub1:; + while (true) + { + continue2:; + compareResult = pivot.CompareTo(arr[j]); + if (compareResult == -1) + { + j--; + goto continue2; + } + goto endSub2; + } + endSub2:; + if (i <= j) + { + temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + i++; + j--; + } + } + endMain:; +}); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.Comparison_function_with_goto_labels +var _ = (Func)(( + int left, + int right) => //int +{ + int compareResult = default; + compareResult = left.CompareTo(right); + compareResult = -compareResult; + if (compareResult == -1) + { + return -1; + } + return 1; +}); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_NullableInt_ArrayAccessError +var _ = (Func[]>, int?>)((List[]> dataArrayList) => //int? +{ + int left_ListIndex = default; + int left_ArrayIndex = default; + int? left_0 = null; + left_ListIndex = 0; + left_ArrayIndex = 0; + left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; + endMain:; + return left_0; +}); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_Int_ArrayAccessError +var _ = (Func, int>)((List dataArrayList) => //int +{ + int left_ListIndex = default; + int left_ArrayIndex = default; + int left_0 = default; + left_ListIndex = 0; + left_ArrayIndex = 0; + left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; + endMain:; + return left_0; +}); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_String_ArrayAccessError +var _ = (Func, string>)((List dataArrayList) => //string +{ + int left_ListIndex = default; + int left_ArrayIndex = default; + string left_0 = null; + left_ListIndex = 0; + left_ArrayIndex = 0; + left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; + endMain:; + return left_0; +}); + +//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_Struct_ArrayAccess +var _ = (Func, int?>)((List dataArrayList) => //int? +{ + int left_ListIndex = default; + int left_ArrayIndex = default; + int? left_0 = null; + left_ListIndex = 0; + left_ArrayIndex = 0; + left_0 = dataArrayList[left_ListIndex][left_ArrayIndex].Foo; + endMain:; + return left_0; +}); + +//## .NET Latest (Core): Running UnitTests and IssueTests in parallel... + +//ArithmeticOperationsTests.Can_modulus_custom_in_Action_block +var _ = (Action)(( + BigInteger a, + BigInteger b) => //void +{ + _ = a % b; +}); + +//ArithmeticOperationsTests.Can_modulus_custom_in_Action +var _ = (Action)(( + BigInteger a, + BigInteger b) => //void +{ + _ = a % b; +}); + +//ArithmeticOperationsTests.Can_add_string_and_not_string +var _ = (Func)(() => //string + default(c__DisplayClass37_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s1 + ((object)default(c__DisplayClass37_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s2)); + +//ArithmeticOperationsTests.Can_modulus_custom +var _ = (Func)(( + BigInteger a, + BigInteger b) => //BigInteger + a % b); + +//Issue44_Conversion_To_Nullable_Throws_Exception.Conversion_to_nullable_should_work_with_null_constructed_with_expressions +var _ = (Func)(() => //int? + (int?)null); + +//Issue44_Conversion_To_Nullable_Throws_Exception.Conversion_to_nullable_should_work_with_null_constructed_with_expressions +var _ = (Func)(() => //int? + (int?)null); + +//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfStruct +var _ = (ActionRef)((ref RecVal recVal_0) => //void +{ + RecVal recVal_1 = default; + recVal_1 = recVal_0; + Issue55_CompileFast_crash_with_ref_parameter.SetMinus1_OfStruct(ref recVal_1); +}); + +//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfString +var _ = (ActionRef)((ref string string_0) => //void +{ + string string_1 = null; + string_1 = string_0; + Issue55_CompileFast_crash_with_ref_parameter.SetMinus1_OfString(ref string_1); +}); + +//Issue55_CompileFast_crash_with_ref_parameter.BlockWithNonRefStatementLast +var _ = (ActionRef)((ref uint uint_0) => //void +{ + double double_1 = default; + uint_0 = (uint)3; + double_1 = 0; +}); + +//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfInt +var _ = (ActionRef)((ref int int_0) => //void +{ + int int_1 = default; + int_1 = int_0; + Issue55_CompileFast_crash_with_ref_parameter.SetMinus1(ref int_1); +}); + +//ArithmeticOperationsTests.Can_modulus_custom_in_Action_block +var _ = (Action)(( + BigInteger a, + BigInteger b) => //void +{ + _ = a % b; +}); + +//ArithmeticOperationsTests.Can_modulus_custom_in_Action +var _ = (Action)(( + BigInteger a, + BigInteger b) => //void +{ + _ = a % b; +}); + +//ArithmeticOperationsTests.Can_add_string_and_not_string +var _ = (Func)(() => //string + default(c__DisplayClass37_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s1 + ((object)default(c__DisplayClass37_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s2)); + +//ArithmeticOperationsTests.Can_modulus_custom +var _ = (Func)(( + BigInteger a, + BigInteger b) => //BigInteger + a % b); + +//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfStruct +var _ = (ActionRef)((ref RecVal recVal_0) => //void +{ + RecVal recVal_1 = default; + recVal_1 = recVal_0; + Issue55_CompileFast_crash_with_ref_parameter.SetMinus1_OfStruct(ref recVal_1); +}); + +//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfString +var _ = (ActionRef)((ref string string_0) => //void +{ + string string_1 = null; + string_1 = string_0; + Issue55_CompileFast_crash_with_ref_parameter.SetMinus1_OfString(ref string_1); +}); + +//Issue55_CompileFast_crash_with_ref_parameter.BlockWithNonRefStatementLast +var _ = (ActionRef)((ref uint uint_0) => //void +{ + double double_1 = default; + uint_0 = (uint)3; + double_1 = 0; +}); + +//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfInt +var _ = (ActionRef)((ref int int_0) => //void +{ + int int_1 = default; + int_1 = int_0; + Issue55_CompileFast_crash_with_ref_parameter.SetMinus1(ref int_1); +}); + +//AssignTests.Array_multi_dimensional_index_assign_value_type_block +var _ = (Func)(() => //int +{ + int[,] int__a_0 = null; + int__a_0 = new int[ + 2, + 1]; + int__a_0[1, 0] = 5; + return int__a_0[1, 0]; +}); + +//AssignTests.Can_assign_to_parameter_in_nested_lambda +var _ = (Func>)((string s) => //Func + (Func)(() => //string + s = "aaa")); + +//AssignTests.Parameter_test_try_catch_finally_result +T __f(System.Func f) => f(); +var _ = (Func)((TryCatchTest tryCatchTest_0) => //TryCatchTest +{ + tryCatchTest_0 = + __f(() => { + try + { + return new TryCatchTest(); + } + catch (Exception) + { + return (TryCatchTest)null; + } + }); + return tryCatchTest_0; +}); + +//Issue65_Add_ExpressionInfo_Elvis_operator_support.Test +var _ = (Func)((int n) => //string +{ + A x = null; + x = Issue65_Add_LightExpression_Elvis_operator_support.GetAnA(n); + return (x == (A)null) ? null : + x.GetTheAnswer(); +}); + +//AssignTests.Member_test_try_catch_finally_result +T __f(System.Func f) => f(); +var _ = (Func)(() => //TryCatchTest +{ + try + { + TryCatchTest tryCatchTest_0 = null; + tryCatchTest_0 = new TryCatchTest(); + tryCatchTest_0.NestedTest = + __f(() => { + try + { + TryCatchNestedTest tryCatchNestedTest_1 = null; + tryCatchNestedTest_1 = new TryCatchNestedTest(); + tryCatchNestedTest_1.Nested = "Value"; + return tryCatchNestedTest_1; + } + catch (Exception) + { + return (TryCatchNestedTest)null; + } + }); + return tryCatchTest_0; + } + catch (Exception) + { + return (TryCatchTest)null; + } +}); + +//AssignTests.Array_multi_dimensional_index_assign_value_type_block +var _ = (Func)(() => //int +{ + int[,] int__a_0 = null; + int__a_0 = new int[ + 2, + 1]; + int__a_0[1, 0] = 5; + return int__a_0[1, 0]; +}); + +//AssignTests.Array_multi_dimensional_index_assign_value_type_block +var _ = (Func)(() => //int +{ + int[,] int__a_0 = null; + int__a_0 = new int[ + 2, + 1]; + int__a_0[1, 0] = 5; + return int__a_0[1, 0]; +}); + +//AssignTests.Can_assign_to_parameter_in_nested_lambda +var _ = (Func>)((string s) => //Func + (Func)(() => //string + s = "aaa")); + +//AssignTests.Parameter_test_try_catch_finally_result +T __f(System.Func f) => f(); +var _ = (Func)((TryCatchTest tryCatchTest_0) => //TryCatchTest +{ + tryCatchTest_0 = + __f(() => { + try + { + return new TryCatchTest(); + } + catch (Exception) + { + return (TryCatchTest)null; + } + }); + return tryCatchTest_0; +}); + +//AssignTests.Member_test_try_catch_finally_result +T __f(System.Func f) => f(); +var _ = (Func)(() => //TryCatchTest +{ + try + { + TryCatchTest tryCatchTest_0 = null; + tryCatchTest_0 = new TryCatchTest(); + tryCatchTest_0.NestedTest = + __f(() => { + try + { + TryCatchNestedTest tryCatchNestedTest_1 = null; + tryCatchNestedTest_1 = new TryCatchNestedTest(); + tryCatchNestedTest_1.Nested = "Value"; + return tryCatchNestedTest_1; + } + catch (Exception) + { + return (TryCatchNestedTest)null; + } + }); + return tryCatchTest_0; + } + catch (Exception) + { + return (TryCatchTest)null; + } +}); + +//BinaryExpressionTests.Issue399_Coalesce_for_nullable_long_and_non_nullable_long +var _ = (Action)(( + Source s, + Destination d) => //void +{ + d.NumberNonNullable = s.Number ?? (long)0; +}); + +//BinaryExpressionTests.Issue399_Coalesce_for_nullable_long_Automapper_test_Should_substitute_zero_for_null +var _ = (Action)(( + Source s, + Destination d) => //void +{ + d.Number = s.Number ?? (long?)(long)0; +}); + +//Issue76_Expression_Convert_causing_signature_or_security_transparency_is_not_compatible_exception.When_using_fast_expression_compilation +var _ = (Action)(( + TestTarget doc, + Guid id) => //void +{ + doc.ID = (CustomID)id; +}); + +//BinaryExpressionTests.Issue399_Coalesce_for_nullable_long_and_non_nullable_long +var _ = (Action)(( + Source s, + Destination d) => //void +{ + d.NumberNonNullable = s.Number ?? (long)0; +}); + +//Issue76_Expression_Convert_causing_signature_or_security_transparency_is_not_compatible_exception.When_using_fast_expression_compilation +var _ = (Action)(( + TestTarget doc, + Guid id) => //void +{ + doc.ID = (CustomID)id; +}); + +//BinaryExpressionTests.Issue399_Coalesce_for_nullable_long_Automapper_test_Should_substitute_zero_for_null +var _ = (Action)(( + Source s, + Destination d) => //void +{ + d.Number = s.Number ?? (long?)(long)0; +}); + +//Issue83_linq2db.linq2db_NullReferenceException +var _ = (Func)(( + IQueryRunner qr, + IDataReader dr) => //InheritanceA + ((Func)(( + IQueryRunner qr_1, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps) => //InheritanceA + { + SQLiteDataReader ldr = null; + ldr = (SQLiteDataReader)rd; + return ((ldr.IsDBNull(0) ? TypeCodeEnum.Base : + (TypeCodeEnum)ldr.GetInt32(0)) == TypeCodeEnum.A1) ? + (InheritanceA)(InheritanceA1)TableContext.OnEntityCreated( + dctx, + new InheritanceA1() + { + GuidValue = (ldr.IsDBNull(1) ? Guid.Parse("00000000-0000-0000-0000-000000000000") : + ldr.GetGuid(1)) + }) : + (InheritanceA)(InheritanceA2)TableContext.OnEntityCreated( + dctx, + new InheritanceA2() + { + GuidValue = (ldr.IsDBNull(1) ? Guid.Parse("00000000-0000-0000-0000-000000000000") : + ldr.GetGuid(1)) + }); + })) + .Invoke( + qr, + qr.DataContext, + dr, + qr.Expression, + qr.Parameters)); + +//BlockTests.Block_local_variable_assignment +var _ = (Func)(() => //int +{ + int int_0 = default; + int int_1 = default; + int_0 = 5; + return int_1 = 6; +}); + +//Issue83_linq2db.linq2db_InvalidProgramException2_reuse_variable_for_upper_and_nested_lambda +T __f(System.Func f) => f(); +var _ = (Func)(( + IQueryRunner qr, + IDataReader dr) => //object +{ + _ = ((Func)(( + IQueryRunner qr, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps) => //object + { + SQLiteDataReader ldr = null; + ldr = (SQLiteDataReader)rd; + return (object) + __f(() => { + _ = Issue83_linq2db.CheckNullValue( + rd, + "Average"); + return ldr.IsDBNull(0) ? 0 : + (double)Issue83_linq2db.ConvertDefault( + ldr.GetValue(0), + typeof(double)); + }); + })) + .Invoke( + qr, + qr.DataContext, + dr, + qr.Expression, + qr.Parameters); + return ((Func)(( + IQueryRunner qr, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps) => //object + { + SQLiteDataReader ldr = null; + ldr = (SQLiteDataReader)rd; + return (object) + __f(() => { + _ = Issue83_linq2db.CheckNullValue( + rd, + "Average"); + return ldr.IsDBNull(0) ? 0 : + (double)Issue83_linq2db.ConvertDefault( + ldr.GetValue(0), + typeof(double)); + }); + })) + .Invoke( + qr, + qr.DataContext, + dr, + qr.Expression, + qr.Parameters); +}); + +//BlockTests.Block_returning_the_nested_lambda_assigning_the_outer_parameter +var _ = (Func>)((int p) => //Func + (Func)(() => //int + p = 42)); + +//BlockTests.Block_calling_non_void_method_returning_the_nested_lambda_assigning_the_outer_parameter +var _ = (Func>)((int p) => //Func +{ + _ = BlockTests.Inc(p); + return (Func)(() => //int + p = 42); +}); + +//BlockTests.Block_calling_non_void_method_returning_the_nested_lambda_incrementing_the_outer_parameter +var _ = (Func>)((int p) => //Func +{ + return (Func)(() => //int + ++p); +}); + +//Issue83_linq2db.String_to_number_conversion_using_convert_with_method_with_DefaultExpression +var _ = (Func)((string p) => //int + (p != (string)null) ? (int)p : default(int)); + +//Issue83_linq2db.Jit_compiler_internal_limitation +var _ = (Action)(( + object obj, + object @value) => //void +{ + TestClass2 testClass2_0 = null; + TestClass3 testClass3_1 = null; + TestClass4 testClass4_2 = null; + testClass2_0 = ((TestClass1)obj).Class2; + if (testClass2_0 == null) + { + testClass2_0 = new TestClass2(); + ((TestClass1)obj).Class2 = testClass2_0; + } + testClass3_1 = testClass2_0.Class3; + if (testClass3_1 == null) + { + testClass3_1 = new TestClass3(); + testClass2_0.Class3 = testClass3_1; + } + testClass4_2 = testClass3_1.Class4; + if (testClass4_2 == null) + { + testClass4_2 = new TestClass4(); + testClass3_1.Class4 = testClass4_2; + } + testClass4_2.Field1 = (int)@value; +}); + +//BlockTests.Block_local_variable_assignment +var _ = (Func)(() => //int +{ + int int_0 = default; + int int_1 = default; + int_0 = 5; + return int_1 = 6; +}); + +//BlockTests.Block_local_variable_assignment_with_lambda_invoke +var _ = (Func)(() => //int +{ + int int_0 = default; + return ((Func)(() => //int + int_0 = 6)) + .Invoke(); +}); + +//BlockTests.Block_returning_the_nested_lambda_assigning_the_outer_parameter +var _ = (Func>)((int p) => //Func + (Func)(() => //int + p = 42)); + +//BlockTests.Block_calling_non_void_method_returning_the_nested_lambda_assigning_the_outer_parameter +var _ = (Func>)((int p) => //Func +{ + _ = BlockTests.Inc(p); + return (Func)(() => //int + p = 42); +}); + +//BlockTests.Block_calling_non_void_method_returning_the_nested_lambda_incrementing_the_outer_parameter +var _ = (Func>)((int p) => //Func +{ + return (Func)(() => //int + ++p); +}); + +//BlockTests.Block_assigning_local_variable_then_returning_the_nested_lambda_which_reassigns_the_variable +var _ = (Func>)(() => //Func +{ + string string_0 = null; + string_0 = "35"; + return (Func)(() => //string + string_0 = "42"); +}); + +//Issue83_linq2db.linq2db_InvalidProgramException3 +var _ = (Func)((IDataReader rd) => //int +{ + SQLiteDataReader ldr = null; + int int123 = default; + ldr = (SQLiteDataReader)rd; + return int123 = (ldr.IsDBNull(0) ? (int?)null : + new int?(ldr.GetInt32(0))) ?? Issue83_linq2db.GetDefault2(ldr.IsDBNull(0) ? 0 : + ldr.GetInt32(0)); +}); + +//ConditionalOperatorsTests.Ternarary_operator_with_logical_op +var _ = (Func)(() => //object + ((default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.x > 0) && ((default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.Contains("e") && default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.Contains("X")) || (default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.StartsWith("T") && default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.EndsWith("t")))) ? + string.Concat( + default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s, + "ccc") : + string.Empty); + +//Issue83_linq2db.linq2db_NullReferenceException +var _ = (Func)(( + IQueryRunner qr, + IDataReader dr) => //InheritanceA + ((Func)(( + IQueryRunner qr_1, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps) => //InheritanceA + { + SQLiteDataReader ldr = null; + ldr = (SQLiteDataReader)rd; + return ((ldr.IsDBNull(0) ? TypeCodeEnum.Base : + (TypeCodeEnum)ldr.GetInt32(0)) == TypeCodeEnum.A1) ? + (InheritanceA)(InheritanceA1)TableContext.OnEntityCreated( + dctx, + new InheritanceA1() + { + GuidValue = (ldr.IsDBNull(1) ? Guid.Parse("00000000-0000-0000-0000-000000000000") : + ldr.GetGuid(1)) + }) : + (InheritanceA)(InheritanceA2)TableContext.OnEntityCreated( + dctx, + new InheritanceA2() + { + GuidValue = (ldr.IsDBNull(1) ? Guid.Parse("00000000-0000-0000-0000-000000000000") : + ldr.GetGuid(1)) + }); + })) + .Invoke( + qr, + qr.DataContext, + dr, + qr.Expression, + qr.Parameters)); + +//ConditionalOperatorsTests.Ternarary_operator_with_logical_op +var _ = (Func)(() => //object + ((default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.x > 0) && ((default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.Contains("e") && default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.Contains("X")) || (default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.StartsWith("T") && default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.EndsWith("t")))) ? + string.Concat( + default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s, + "ccc") : + string.Empty); + +//Issue83_linq2db.linq2db_InvalidProgramException2_reuse_variable_for_upper_and_nested_lambda +T __f(System.Func f) => f(); +var _ = (Func)(( + IQueryRunner qr, + IDataReader dr) => //object +{ + _ = ((Func)(( + IQueryRunner qr, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps) => //object + { + SQLiteDataReader ldr = null; + ldr = (SQLiteDataReader)rd; + return (object) + __f(() => { + _ = Issue83_linq2db.CheckNullValue( + rd, + "Average"); + return ldr.IsDBNull(0) ? 0 : + (double)Issue83_linq2db.ConvertDefault( + ldr.GetValue(0), + typeof(double)); + }); + })) + .Invoke( + qr, + qr.DataContext, + dr, + qr.Expression, + qr.Parameters); + return ((Func)(( + IQueryRunner qr, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps) => //object + { + SQLiteDataReader ldr = null; + ldr = (SQLiteDataReader)rd; + return (object) + __f(() => { + _ = Issue83_linq2db.CheckNullValue( + rd, + "Average"); + return ldr.IsDBNull(0) ? 0 : + (double)Issue83_linq2db.ConvertDefault( + ldr.GetValue(0), + typeof(double)); + }); + })) + .Invoke( + qr, + qr.DataContext, + dr, + qr.Expression, + qr.Parameters); +}); + +//Issue83_linq2db.String_to_number_conversion_using_convert_with_method_with_DefaultExpression +var _ = (Func)((string p) => //int + (p != (string)null) ? (int)p : default(int)); + +//Issue83_linq2db.Jit_compiler_internal_limitation +var _ = (Action)(( + object obj, + object @value) => //void +{ + TestClass2 testClass2_0 = null; + TestClass3 testClass3_1 = null; + TestClass4 testClass4_2 = null; + testClass2_0 = ((TestClass1)obj).Class2; + if (testClass2_0 == null) + { + testClass2_0 = new TestClass2(); + ((TestClass1)obj).Class2 = testClass2_0; + } + testClass3_1 = testClass2_0.Class3; + if (testClass3_1 == null) + { + testClass3_1 = new TestClass3(); + testClass2_0.Class3 = testClass3_1; + } + testClass4_2 = testClass3_1.Class4; + if (testClass4_2 == null) + { + testClass4_2 = new TestClass4(); + testClass3_1.Class4 = testClass4_2; + } + testClass4_2.Field1 = (int)@value; +}); + +//ConstantAndConversionTests.Issue464_Bound_closure_constants_can_be_modified_afterwards +var _ = (Func)(() => //int + default(Foo)/*NOTE: Provide the non-default value for the Constant!*/.Value); + +//ConstantAndConversionTests.Issue465_The_primitive_constant_can_be_configured_to_put_in_closure +var _ = (Func)(() => //int + default(ValueRef)/*NOTE: Provide the non-default value for the Constant!*/.Value); + +//ConstantAndConversionTests.Issue466_The_constant_may_be_referenced_multiple_times +var _ = (Func)(() => //int + default(ValueRef)/*NOTE: Provide the non-default value for the Constant!*/.Value + default(ValueRef)/*NOTE: Provide the non-default value for the Constant!*/.Value); + +//Issue83_linq2db.linq2db_InvalidProgramException3 +var _ = (Func)((IDataReader rd) => //int +{ + SQLiteDataReader ldr = null; + int int123 = default; + ldr = (SQLiteDataReader)rd; + return int123 = (ldr.IsDBNull(0) ? (int?)null : + new int?(ldr.GetInt32(0))) ?? Issue83_linq2db.GetDefault2(ldr.IsDBNull(0) ? 0 : + ldr.GetInt32(0)); +}); + +//ConvertOperatorsTests.Convert_Func_to_Custom_delegate_should_work +var _ = (Func, GetString>)((Func p) => //GetString + (GetString)(MethodInfo)default(RuntimeMethodInfo)/*NOTE: Provide the non-default value for the Constant!*/.CreateDelegate( + typeof(GetString), + p)); + +//ConvertOperatorsTests.Convert_Func_to_Custom_delegate_should_work +var _ = (Func, GetString>)((Func fs) => //GetString + (GetString)fs.Invoke); + +//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_via_comparison_method_with_non_nullable_parameters +var _ = (Func)((MyEnum? myEnum__0) => //string +{ + switch (myEnum__0) + { + case (MyEnum?)MyEnum.A: + return "A"; + case (MyEnum?)MyEnum.B: + return "B"; + case (MyEnum?)MyEnum.C: + return "C"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_to_non_nullable_cases_via_comparison_method_Impossible_both_should_be_nullable +var _ = (Func)((MyEnum? myEnum__0) => //string +{ + switch (myEnum__0) + { + case (MyEnum?)MyEnum.A: + return "A"; + case (MyEnum?)MyEnum.B: + return "B"; + case (MyEnum?)MyEnum.C: + return "C"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.SwitchIsSupported_string_with_comparison_method +var _ = (Func)((string string_0) => //string +{ + switch (string_0) + { + case "a": + return "A"; + case "b": + return "B"; + default: + return "C"; + } +}); + +//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_to_nullable_cases +var _ = (Func)((MyEnum? myEnum__0) => //string +{ + switch (myEnum__0) + { + case (MyEnum?)MyEnum.A: + return "A"; + case (MyEnum?)MyEnum.B: + return "B"; + case (MyEnum?)MyEnum.C: + return "C"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.SwitchIsSupported_bool_value +var _ = (Func)((bool bool_0) => //string +{ + switch (bool_0) + { + case true: + return "A"; + case false: + return "B"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.SwitchIsSupported1 +var _ = (Func)((int int_0) => //string +{ + switch (int_0) + { + case 1: + return "A"; + case 2: + return "B"; + case 5: + return "C"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.SwitchIsSupported31 +var _ = (Func)((int int_0) => //string +{ + switch (int_0) + { + case 1: + return "A"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.SwitchIsSupported_string +var _ = (Func)((string string_0) => //string +{ + switch (string_0) + { + case "A": + return "A"; + case "B": + return "B"; + default: + return "C"; + } +}); + +//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_via_comparison_method_with_non_nullable_parameters +var _ = (Func)((MyEnum? myEnum__0) => //string +{ + switch (myEnum__0) + { + case (MyEnum?)MyEnum.A: + return "A"; + case (MyEnum?)MyEnum.B: + return "B"; + case (MyEnum?)MyEnum.C: + return "C"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_to_non_nullable_cases_via_comparison_method_Impossible_both_should_be_nullable +var _ = (Func)((MyEnum? myEnum__0) => //string +{ + switch (myEnum__0) + { + case (MyEnum?)MyEnum.A: + return "A"; + case (MyEnum?)MyEnum.B: + return "B"; + case (MyEnum?)MyEnum.C: + return "C"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.SwitchIsSupported_string_with_comparison_method +var _ = (Func)((string string_0) => //string +{ + switch (string_0) + { + case "a": + return "A"; + case "b": + return "B"; + default: + return "C"; + } +}); + +//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_to_nullable_cases +var _ = (Func)((MyEnum? myEnum__0) => //string +{ + switch (myEnum__0) + { + case (MyEnum?)MyEnum.A: + return "A"; + case (MyEnum?)MyEnum.B: + return "B"; + case (MyEnum?)MyEnum.C: + return "C"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.SwitchIsSupported_bool_value +var _ = (Func)((bool bool_0) => //string +{ + switch (bool_0) + { + case true: + return "A"; + case false: + return "B"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.SwitchIsSupported1 +var _ = (Func)((int int_0) => //string +{ + switch (int_0) + { + case 1: + return "A"; + case 2: + return "B"; + case 5: + return "C"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.SwitchIsSupported31 +var _ = (Func)((int int_0) => //string +{ + switch (int_0) + { + case 1: + return "A"; + default: + return "Z"; + } +}); + +//Issue127_Switch_is_supported.SwitchIsSupported_string +var _ = (Func)((string string_0) => //string +{ + switch (string_0) + { + case "A": + return "A"; + case "B": + return "B"; + default: + return "C"; + } +}); + +//Issue156_InvokeAction.InvokeActionConstantIsSupported +var _ = (Action)(() => //void +{ + (default(Action)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( + (object)4, + (object)2); +}); + +//HoistedLambdaExprTests.Should_compile_nested_lambda +var _ = (Func)(() => //X + X.Get( + (Func)((A it) => //X + new X(it)), + new Lazy((Func)(() => //A + default(c__DisplayClass1_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.a)))); + +//Issue156_InvokeAction.InvokeFuncConstantIsSupported +var _ = (Func)(() => //string + (default(Func)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( + 4, + 2)); + +//HoistedLambdaExprTests.Should_compile_nested_lambda + +var _ = (Func)(() => //X + X.Get( + (Func)((A it) => //X + new X(it)), + new Lazy((Func)(() => //A + default(c__DisplayClass1_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.a)))); +//Issue156_InvokeAction.InvokeActionConstantIsSupported +var _ = (Action)(() => //void +{ + (default(Action)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( + (object)4, + (object)2); +}); + +//LoopTests.Loop_with_return +var _ = (Action)(() => //void +{ + int i = default; + while (true) + { + if (i > 3) + { + return; + } + ++i; + } + void_0:; +}); + + +//LoopTests.Loop_with_break +var _ = (Action)(() => //void +{ + while (true) + { + int i = default; + if (i > 3) + { + goto void_0; + } + ++i; + } + void_0:; +}); +//Issue156_InvokeAction.InvokeFuncConstantIsSupported +var _ = (Func)(() => //string + (default(Func)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( + 4, + 2)); + +//LoopTests.Loop_with_unused_break +var _ = (Action)(() => //void +{ + int i = default; + while (true) + { + if (i > 3) + { + return; + } + ++i; + } + void_0:; + void_1:; +}); + +//LoopTests.Loop_with_break_and_continue +var _ = (Action)(() => //void +{ + int i = default; + int j = default; + while (true) + { + void_0:; + if (j == 0) + { + ++j; + goto void_0; + } + if (i > 3) + { + goto void_1; + } + ++i; + } + void_1:; +}); + + +//LoopTests.Loop_with_unused_continue +//Issue159_NumericConversions.FloatToDecimalNullableShouldWork +var _ = (Action)(() => //void +{ + int i = default; + while (true) + { + void_0:; + if (i > 3) + { + goto void_1; + } + ++i; + } + void_1:; +}); +var _ = (Func, ValueHolder>)((ValueHolder floatValue) => //ValueHolder +{ + ValueHolder nullableDecimal = null; + nullableDecimal = new ValueHolder(); + nullableDecimal.Value = (Decimal?)floatValue.Value; + return nullableDecimal; +}); + +//LoopTests.Loop_with_unused_break_and_continue +var _ = (Action)(() => //void +{ + int i = default; + while (true) + { + void_0:; + if (i > 3) + { + return; + } + ++i; + } + void_1:; + void_2:; +}); + +//LoopTests.Loop_with_return_value +var _ = (Func)(() => //int +{ + int i = default; + while (true) + { + i = 4; + if (i > 3) + { + return 5; + } + } + int_0:; +}); + +//LoopTests.Loop_with_return +var _ = (Action)(() => //void +{ + int i = default; + while (true) + { + if (i > 3) + { + return; + } + ++i; + } + void_0:; +}); + +//LoopTests.Loop_with_break +var _ = (Action)(() => //void +{ + while (true) + { + int i = default; + if (i > 3) + { + goto void_0; + } + ++i; + } + void_0:; +}); + +//LoopTests.Loop_with_unused_break +var _ = (Action)(() => //void +{ + int i = default; + while (true) + { + if (i > 3) + { + return; + } + ++i; + } + void_0:; + void_1:; +}); + +//LoopTests.Loop_with_break_and_continue +var _ = (Action)(() => //void +{ + int i = default; + int j = default; + while (true) + { + void_0:; + if (j == 0) + { + ++j; + goto void_0; + } + if (i > 3) + { + goto void_1; + } + ++i; + } + void_1:; +}); + +//LoopTests.Loop_with_unused_continue +var _ = (Action)(() => //void +{ + int i = default; + while (true) + { + void_0:; + if (i > 3) + { + goto void_1; + } + ++i; + } + void_1:; +}); + +//LoopTests.Loop_with_unused_break_and_continue +var _ = (Action)(() => //void +{ + int i = default; + while (true) + { + void_0:; + if (i > 3) + { + return; + } + ++i; + } + void_1:; + void_2:; +}); + +//LoopTests.Loop_with_return_value +var _ = (Func)(() => //int +{ + int i = default; + while (true) + { + i = 4; + if (i > 3) + { + return 5; + } + } + int_0:; +}); + +//ListInitTests.Simple_ListInit_works +var _ = (Func>)((ListInitTests obj) => //IEnumerable + new List() + { + new PropertyValue( + "Id", + obj.Id, + default(ClassProperty)/*NOTE: Provide the non-default value for the Constant!*/), + new PropertyValue( + "Property1", + obj.Property1, + default(ClassProperty)/*NOTE: Provide the non-default value for the Constant!*/) + }); + +//ListInitTests.Simple_ListInit_works + +//Issue159_NumericConversions.ConvertNullableFloatToDecimal +var _ = (Func)((float? f) => //Decimal? + (Decimal?)f); +var _ = (Func>)((ListInitTests obj) => //IEnumerable + new List() + { + new PropertyValue( + "Id", + obj.Id, + default(ClassProperty)/*NOTE: Provide the non-default value for the Constant!*/), + new PropertyValue( + "Property1", + obj.Property1, + default(ClassProperty)/*NOTE: Provide the non-default value for the Constant!*/) + }); + +//NestedLambdaTests.Issue401_What_happens_if_inlined_invocation_of_lambda_overrides_the_same_parameter +var _ = (Func)((int int_0) => //int +{ + int_0 = 42; + ((Action)((int int_0) => //void + { + int_0 = int_0 - 2; + })) + .Invoke( + int_0); + return int_0; +}); + +//NestedLambdaTests.Hmm_I_can_use_the_same_parameter_for_outer_and_nested_lambda +var _ = (Func)(() => //int + ((Func)((int n) => //int + n - ((Func)((int n) => //int + n + 1)) + .Invoke( + n))) + .Invoke( + 42) + ((Func)((int n) => //int + n + 1)) + .Invoke( + 13)); + +//NestedLambdaTests.Using_try_finally_as_arithmetic_operand_use_void_block_in_finally +T __f(System.Func f) => f(); +var _ = (Func)((int n) => //int + n - + __f(() => { + int nSaved = default; + try + { + nSaved = n; + return n + 10; + } + finally + { + n = nSaved; + } + })); + +//NestedLambdaTests.Using_try_finally_as_arithmetic_operand +T __f(System.Func f) => f(); +var _ = (Func)((int n) => //int + n - + __f(() => { + int nSaved = default; + try + { + nSaved = n; + return n + 10; + } + finally + { + n = nSaved; + } + })); + +//Issue159_NumericConversions.FloatToDecimalNullableShouldWork +var _ = (Func, ValueHolder>)((ValueHolder floatValue) => //ValueHolder +{ + ValueHolder nullableDecimal = null; + nullableDecimal = new ValueHolder(); + nullableDecimal.Value = (Decimal?)floatValue.Value; + return nullableDecimal; +}); + +//Issue159_NumericConversions.ConvertNullableFloatToDecimal +var _ = (Func)((float? f) => //Decimal? + (Decimal?)f); + +//NestedLambdaTests.Issue401_What_happens_if_inlined_invocation_of_lambda_overrides_the_same_parameter +var _ = (Func)((int int_0) => //int +{ + int_0 = 42; + ((Action)((int int_0) => //void + { + int_0 = int_0 - 2; + })) + .Invoke( + int_0); + return int_0; +}); + +//NestedLambdaTests.Hmm_I_can_use_the_same_parameter_for_outer_and_nested_lambda +var _ = (Func)(() => //int + ((Func)((int n) => //int + n - ((Func)((int n) => //int + n + 1)) + .Invoke( + n))) + .Invoke( + 42) + ((Func)((int n) => //int + n + 1)) + .Invoke( + 13)); + +//NestedLambdaTests.Using_try_finally_as_arithmetic_operand_use_void_block_in_finally +T __f(System.Func f) => f(); +var _ = (Func)((int n) => //int + n - + __f(() => { + int nSaved = default; + try + { + nSaved = n; + return n + 10; + } + finally + { + n = nSaved; + } + })); + +//NestedLambdaTests.Using_try_finally_as_arithmetic_operand +T __f(System.Func f) => f(); +var _ = (Func)((int n) => //int + n - + __f(() => { + int nSaved = default; + try + { + nSaved = n; + return n + 10; + } + finally + { + n = nSaved; + } + })); + +//Issue170_Serializer_Person_Ref.InvokeActionConstantIsSupported +var _ = (DeserializeDelegate)(( + byte[] buffer, + ref int offset, + ref Person @value) => //void +{ + @value.Health = 5; + @value.Name = "test result name"; +}); + +//Issue170_Serializer_Person_Ref.InvokeActionConstantIsSupportedSimpleClass_AddAssign +var _ = (DeserializeDelegateSimple)((ref SimplePersonClass @value) => //void +{ + @value.Health += 5; +}); + +//Issue170_Serializer_Person_Ref.InvokeActionConstantIsSupported +var _ = (DeserializeDelegate)(( + byte[] buffer, + ref int offset, + ref Person @value) => //void +{ + @value.Health = 5; + @value.Name = "test result name"; +}); + +//Issue170_Serializer_Person_Ref.InvokeActionConstantIsSupportedSimpleClass_AddAssign +var _ = (DeserializeDelegateSimple)((ref SimplePersonClass @value) => //void +{ + @value.Health += 5; +}); + +//Issue181_TryEmitIncDecAssign_InvalidCastException.TryEmitIncDecAssign_Supports_PostIncrement_Property_Action + +//TryCatchTests.Can_return_nested_catch_block_result +var _ = (Action)((Issue181_TryEmitIncDecAssign_InvalidCastException issue181_TryEmitIncDecAssign_InvalidCastException_0) => //void +{ + issue181_TryEmitIncDecAssign_InvalidCastException_0.CounterProperty++; +}); +var _ = (Func)(() => //string +{ + try + { + try + { + throw new Exception(); + } + catch (Exception) + { + return "From inner Catch block"; + } + string_0:; + } + catch (Exception) + { + return "From outer Catch block"; + } + string_1:; +}); + +//TryCatchTests.Can_handle_the_exception_and_return_result_from_TryCatch_block +var _ = (Func)((string a) => //int +{ + try + { + return int.Parse(a); + } + catch (Exception ex) + { + return (ex.Message.Length > 0) ? 47 : 0; + } +}); + +//TryCatchTests.Issue424_Can_be_nested_in_call_expression + +T __f(System.Func f) => f(); +var _ = (Func, Func, Func, string>)(( + Func pa, + Func pb, + Func pc) => //string + TryCatchTests.TestMethod( + __f(() => { + try + { + return pa.Invoke(); + } + catch (Exception ex) + { + return ex.Message; + } + }), + __f(() => { + try + { + return pb.Invoke(); + } + catch (Exception ex) + { + return ex.Message; + } + }), + __f(() => { + try + { + return pc.Invoke(); + } + catch (Exception ex) + { + return ex.Message; + } + }))); +//Issue181_TryEmitIncDecAssign_InvalidCastException.TryEmitIncDecAssign_Supports_PostIncrement_Property_Action +var _ = (Action)((Issue181_TryEmitIncDecAssign_InvalidCastException issue181_TryEmitIncDecAssign_InvalidCastException_0) => //void +{ + issue181_TryEmitIncDecAssign_InvalidCastException_0.CounterProperty++; +}); + +//TryCatchTests.Can_be_nested_in_binary +T __f(System.Func f) => f(); +var _ = (Func, int>)((Func p) => //int + 1 + + __f(() => { + try + { + return p.Invoke(); + } + catch (Exception) + { + return 0; + } + })); + +//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Test_the_tmp_var_block_reduction +T __f(System.Func f) => f(); +var _ = (Func)(( + Source src, + Dest dst) => //Dest + (src == null) ? (Dest)null : + __f(() => { + dst = dst ?? new Dest(); + dst.Value = src.Value; + return dst; + })); + +//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Coalesce_should_work_with_throw +var _ = (Func)(( + Source src, + Dest dst) => //Dest + (src == null) ? (Dest)null : + dst ?? throw default(ArgumentNullException)/*NOTE: Provide the non-default value for the Constant!*/); + +//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Coalesce_should_produce_optimal_opcodes +var _ = (Func)((Source source) => //Dest + (source == null) ? (Dest)null : + default(Dest)/*NOTE: Provide the non-default value for the Constant!*/ ?? new Dest() + { + Value = source.Value + }); + +//TryCatchTests.Can_return_from_catch_block +var _ = (Func)(() => //bool +{ + try + { + throw default(DivideByZeroException)/*NOTE: Provide the non-default value for the Constant!*/; + return false; + } + catch (DivideByZeroException) + { + return true; + } +}); + +//TryCatchTests.Can_return_with_return_goto_from_the_catch_block +var _ = (Func)(() => //bool +{ + try + { + throw default(DivideByZeroException)/*NOTE: Provide the non-default value for the Constant!*/; + return false; + } + catch (DivideByZeroException) + { + return true; + } +}); + +//TryCatchTests.Can_return_from_try_block_using_label +var _ = (Func)(() => //string +{ + try + { + return "From Try block"; + } + catch (Exception) + { + return "From Catch block"; + } + string_0:; +}); + +//TryCatchTests.Can_return_from_catch_block_using_label +var _ = (Func)(() => //string +{ + try + { + throw new Exception(); + } + catch (Exception) + { + return "From Catch block"; + } + string_0:; +}); + +//TryCatchTests.Can_return_try_block_result_using_label_from_the_inner_try +var _ = (Func)(() => //string +{ + try + { + try + { + return "From inner Try block"; + } + catch (Exception) + { + return "From inner Catch block"; + } + string_0:; + } + catch (Exception) + { + return "From outer Catch block"; + } + string_1:; +}); + +//TryCatchTests.Can_return_from_try_block_using_goto_to_label_with_default_value +var _ = (Func)(() => //string +{ + string s = null; + try + { + return "From Try block"; + } + catch (Exception) + { + return "From Catch block"; + } + string_0:; + return s; +}); + +//TryCatchTests.Can_return_from_try_block_using_goto_to_label_with_the_more_code_after_label +var _ = (Func)(() => //string +{ + string s = null; + try + { + return "From Try block"; + } + catch (Exception) + { + return "From Catch block"; + } + void_0:; + s = "the end"; + return s; +}); + +//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Test_the_tmp_var_block_reduction +T __f(System.Func f) => f(); +var _ = (Func)(( + Source src, + Dest dst) => //Dest + (src == null) ? (Dest)null : + __f(() => { + dst = dst ?? new Dest(); + dst.Value = src.Value; + return dst; + })); + +//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Coalesce_should_work_with_throw +var _ = (Func)(( + Source src, + Dest dst) => //Dest + (src == null) ? (Dest)null : + dst ?? throw default(ArgumentNullException)/*NOTE: Provide the non-default value for the Constant!*/); + +//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Coalesce_should_produce_optimal_opcodes +var _ = (Func)((Source source) => //Dest + (source == null) ? (Dest)null : + default(Dest)/*NOTE: Provide the non-default value for the Constant!*/ ?? new Dest() + { + Value = source.Value + }); + +//TryCatchTests.Can_return_nested_catch_block_result +var _ = (Func)(() => //string +{ + try + { + try + { + throw new Exception(); + } + catch (Exception) + { + return "From inner Catch block"; + } + string_0:; + } + catch (Exception) + { + return "From outer Catch block"; + } + string_1:; +}); + +//TryCatchTests.Can_handle_the_exception_and_return_result_from_TryCatch_block +var _ = (Func)((string a) => //int +{ + try + { + return int.Parse(a); + } + catch (Exception ex) + { + return (ex.Message.Length > 0) ? 47 : 0; + } +}); + +//TryCatchTests.Issue424_Can_be_nested_in_call_expression +T __f(System.Func f) => f(); +var _ = (Func, Func, Func, string>)(( + Func pa, + Func pb, + Func pc) => //string + TryCatchTests.TestMethod( + __f(() => { + try + { + return pa.Invoke(); + } + catch (Exception ex) + { + return ex.Message; + } + }), + __f(() => { + try + { + return pb.Invoke(); + } + catch (Exception ex) + { + return ex.Message; + } + }), + __f(() => { + try + { + return pc.Invoke(); + } + catch (Exception ex) + { + return ex.Message; + } + }))); + +//TryCatchTests.Can_be_nested_in_binary +T __f(System.Func f) => f(); +var _ = (Func, int>)((Func p) => //int + 1 + + __f(() => { + try + { + return p.Invoke(); + } + catch (Exception) + { + return 0; + } + })); + +//Issue204_Operation_could_destabilize_the_runtime__AutoMapper.ShouldAlsoWork +var _ = (Func)((OrderWithNullableStatus src) => //OrderDtoWithNullableStatus +{ + OrderDtoWithNullableStatus dest = null; + Status? resolvedValue = null; + Status? propertyValue = null; + dest = new OrderDtoWithNullableStatus(); + resolvedValue = src.Status; + propertyValue = (resolvedValue == null) ? (Status?)null : + (Status?)resolvedValue.Value; + dest.Status = propertyValue; + return dest; +}); + +//TryCatchTests.Can_return_from_catch_block +var _ = (Func)(() => //bool +{ + try + { + throw default(DivideByZeroException)/*NOTE: Provide the non-default value for the Constant!*/; + return false; + } + catch (DivideByZeroException) + { + return true; + } +}); + +//Issue204_Operation_could_destabilize_the_runtime__AutoMapper.ShouldAlsoWork +var _ = (Func)((OrderWithNullableStatus src) => //OrderDtoWithNullableStatus +{ + OrderDtoWithNullableStatus dest = null; + Status? resolvedValue = null; + Status? propertyValue = null; + dest = new OrderDtoWithNullableStatus(); + resolvedValue = src.Status; + propertyValue = (resolvedValue == null) ? (Status?)null : + (Status?)resolvedValue.Value; + dest.Status = propertyValue; + return dest; +}); + +//TryCatchTests.Can_return_with_return_goto_from_the_catch_block +var _ = (Func)(() => //bool +{ + try + { + throw default(DivideByZeroException)/*NOTE: Provide the non-default value for the Constant!*/; + return false; + } + catch (DivideByZeroException) + { + return true; + } +}); + +//TryCatchTests.Can_return_from_try_block_using_label +var _ = (Func)(() => //string +{ + try + { + return "From Try block"; + } + catch (Exception) + { + return "From Catch block"; + } + string_0:; +}); + +//TryCatchTests.Can_return_from_catch_block_using_label +var _ = (Func)(() => //string +{ + try + { + throw new Exception(); + } + catch (Exception) + { + return "From Catch block"; + } + string_0:; +}); + +//TryCatchTests.Can_return_try_block_result_using_label_from_the_inner_try +var _ = (Func)(() => //string +{ + try + { + try + { + return "From inner Try block"; + } + catch (Exception) + { + return "From inner Catch block"; + } + string_0:; + } + catch (Exception) + { + return "From outer Catch block"; + } + string_1:; +}); + +//TryCatchTests.Can_return_from_try_block_using_goto_to_label_with_default_value +var _ = (Func)(() => //string +{ + string s = null; + try + { + return "From Try block"; + } + catch (Exception) + { + return "From Catch block"; + } + string_0:; + return s; +}); + +//TryCatchTests.Can_return_from_try_block_using_goto_to_label_with_the_more_code_after_label + +//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Static_Value_Method +var _ = (Func)(() => //string +{ + string s = null; + try + { + return "From Try block"; + } + catch (Exception) + { + return "From Catch block"; + } + void_0:; + s = "the end"; + return s; +}); +var _ = (RefDelegate)((ref string string_0) => //string + Issue243_Pass_Parameter_By_Ref_is_supported.PassByValue(string_0)); + +//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Instance_Value_Method +var _ = (RefInstanceDelegate)(( + ref PassedByRefClass passedByRefClass_0, + ref string string_1) => //string + passedByRefClass_0.PassByValue(string_1)); + +//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Struct_Instance_Value_Method +var _ = (RefInstanceDelegate)(( + ref PassedByRefStruct passedByRefStruct_0, + ref int int_1) => //string + passedByRefStruct_0.PassByValue(int_1)); + +//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Static_Value_Method +var _ = (RefDelegate)((ref string string_0) => //string + Issue243_Pass_Parameter_By_Ref_is_supported.PassByValue(string_0)); + +//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Instance_Value_Method +var _ = (RefInstanceDelegate)(( + ref PassedByRefClass passedByRefClass_0, + ref string string_1) => //string + passedByRefClass_0.PassByValue(string_1)); + +//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Struct_Instance_Value_Method +var _ = (RefInstanceDelegate)(( + ref PassedByRefStruct passedByRefStruct_0, + ref int int_1) => //string + passedByRefStruct_0.PassByValue(int_1)); + +//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions +var _ = (Func)(() => //A + new A( + ((B)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 0, + (Func)(() => //B + new B( + ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //C + new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))), + ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))), + ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //C + new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))))); + +//UnaryExpressionTests.PostDecrementAssign_compiles +var _ = (Func)((int i) => //int + i--); + +//UnaryExpressionTests.ArrayOfStructParameter_MemberPostDecrementAssign_works +var _ = (Func)(( + UnaryExpressionTests.X[] a, + int i) => //int + a[i].N--); + +//UnaryExpressionTests.ArrayOfStructParameter_MemberPreDecrementAssign_works +var _ = (Func)(( + UnaryExpressionTests.X[] a, + int i) => //int + --a[i].N); + +//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions_with_3_dublicate_D +var _ = (Func)(() => //A1 + new A1( + ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))), + ((B)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 0, + (Func)(() => //B + new B( + ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //C + new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))), + ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))), + ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //C + new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))))); + +//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions_with_non_passed_params_in_closure +var _ = (Func)(( + Name d1Name, + Name c1Name, + Name b1Name) => //A2 + new A2( + ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 2, + (Func)(() => //D1 + new D1(d1Name)))), + ((C1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 1, + (Func)(() => //C1 + new C1( + ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 2, + (Func)(() => //D1 + new D1(d1Name)))), + c1Name)))), + ((B1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 0, + (Func)(() => //B1 + new B1( + ((C1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 1, + (Func)(() => //C1 + new C1( + ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 2, + (Func)(() => //D1 + new D1(d1Name)))), + c1Name)))), + b1Name, + ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 2, + (Func)(() => //D1 + new D1(d1Name)))))))))); + +//Nested_lambdas_assigned_to_vars.Test_2_shared_lambdas_on_the_same_level +var _ = (Func
)(() => //DD + new DD( + ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))), + ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))); + +//Issue252_Bad_code_gen_for_comparison_of_nullable_type_to_null.Equal_in_void_Handler_should_work +var _ = (Handler)((int? param) => //void +{ + if (param == (int?)null) + { + _ = ((int?)null).ToString(); + }; +}); + +//Issue252_Bad_code_gen_for_comparison_of_nullable_type_to_null.Not_equal_in_void_Handler_should_work +var _ = (Handler)((int? param) => //void +{ + if (!(param == (int?)null)) + { + _ = param.ToString(); + }; +}); + +//Issue252_Bad_code_gen_for_comparison_of_nullable_type_to_null.Equal_in_void_Handler_should_work +var _ = (Handler)((int? param) => //void +{ + if (param == (int?)null) + { + _ = ((int?)null).ToString(); + }; +}); + +//UnaryExpressionTests.Parameter_PostIncrementAssign_compiles + +//Issue252_Bad_code_gen_for_comparison_of_nullable_type_to_null.Not_equal_in_void_Handler_should_work +var _ = (Func)((int i) => //int + i++); +var _ = (Handler)((int? param) => //void +{ + if (!(param == (int?)null)) + { + _ = param.ToString(); + }; +}); + +//UnaryExpressionTests.RefParameter_PostIncrementAssign_works +var _ = (FuncByRef)((ref int i) => //int + i++); + +//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_1 +var _ = (SerializerDelegate)(( + ISerializer serializer, + ref Test data) => //void +{ + serializer.WriteDecimal(in data.Field1); +}); + +//UnaryExpressionTests.ArrayParameter_PostIncrementAssign_works +var _ = (Func)(( + int[] a, + int i) => //int + a[i]++); + +//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_2 +var _ = (SerializerDelegate)(( + ISerializer serializer, + ref Test data) => //void +{ + serializer.WriteDecimal(in data.NestedTest.Field1); +}); + +//UnaryExpressionTests.ArrayParameterByRef_PostIncrementAssign_works +var _ = (FuncArrByRef)(( + ref int[] a, + int i) => //int + a[i]++); + +//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_3 +var _ = (SerializerDelegate)(( + ISerializer serializer, + ref Test data) => //void +{ + serializer.WriteDecimalByVal(data.Field1); +}); + +//UnaryExpressionTests.ArrayItemRefParameter_PostIncrementAssign_works +var _ = (FuncByRef)((ref int i) => //int + i++); + +//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_4 +var _ = (SerializerDelegate)(( + ISerializer serializer, + ref Test data) => //void +{ + serializer.WriteDecimalTwoArgs( + in data.Field1, + (new Klaz( + true, + (float)0.3)).KlazField); +}); + +//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_1 +var _ = (SerializerDelegate)(( + ISerializer serializer, + ref Test data) => //void +{ + serializer.WriteDecimal(in data.Field1); +}); + +//UnaryExpressionTests.PostDecrementAssign_compiles +var _ = (Func)((int i) => //int + i--); + +//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_2 +var _ = (SerializerDelegate)(( + ISerializer serializer, + ref Test data) => //void +{ + serializer.WriteDecimal(in data.NestedTest.Field1); +}); + +//UnaryExpressionTests.ArrayOfStructParameter_MemberPostDecrementAssign_works +var _ = (Func)(( + UnaryExpressionTests.X[] a, + int i) => //int + a[i].N--); + +//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_3 +var _ = (SerializerDelegate)(( + ISerializer serializer, + ref Test data) => //void +{ + serializer.WriteDecimalByVal(data.Field1); +}); + +//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_4 + +var _ = (SerializerDelegate)(( + ISerializer serializer, + ref Test data) => //void +{ + serializer.WriteDecimalTwoArgs( + in data.Field1, + (new Klaz( + true, + (float)0.3)).KlazField); +}); +//UnaryExpressionTests.ArrayOfStructParameter_MemberPreDecrementAssign_works +var _ = (Func)(( + UnaryExpressionTests.X[] a, + int i) => //int + --a[i].N); + +//Issue251_Bad_code_gen_for_byRef_parameters.Test_1 +var _ = (EqualsHandler)(( + in double leftValue, + in double rightValue) => //bool + leftValue.Equals(rightValue)); + +//Issue251_Bad_code_gen_for_byRef_parameters.Test_1 +var _ = (EqualsHandler)(( + in double leftValue, + in double rightValue) => //bool + leftValue.Equals(rightValue)); + +//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Should_Deserialize_Simple +var _ = (DeserializerDlg)(( + ref ReadOnlySequence input, + Word @value, + out long bytesRead) => //bool +{ + SequenceReader reader = default; + string wordValue = null; + reader = new SequenceReader(input); + if (ReaderExtensions.TryReadValue( + ref reader, + out wordValue) == false) + { + bytesRead = reader.Consumed; + return false; + } + @value.Value = wordValue; + bytesRead = reader.Consumed; + return true; +}); + +//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Should_Deserialize_Simple +var _ = (DeserializerDlg)(( + ref ReadOnlySequence input, + Simple @value, + out long bytesRead) => //bool +{ + SequenceReader reader = default; + int identifier = default; + Word[] content = null; + byte contentLength = default; + reader = new SequenceReader(input); + if (ReaderExtensions.TryReadValue( + ref reader, + out identifier) == false) + { + bytesRead = reader.Consumed; + return false; + } + if (ReaderExtensions.TryReadValue( + ref reader, + out contentLength) == false) + { + bytesRead = reader.Consumed; + return false; + } + if (Serializer.TryDeserializeValues( + ref reader, + (int)contentLength, + out content) == false) + { + bytesRead = reader.Consumed; + return false; + } + @value.Identifier = identifier; + @value.Sentence = content; + bytesRead = reader.Consumed; + return true; +}); + +//UnaryExpressionTests.Parameter_PostIncrementAssign_compiles +var _ = (Func)((int i) => //int + i++); + +//UnaryExpressionTests.RefParameter_PostIncrementAssign_works +var _ = (FuncByRef)((ref int i) => //int + i++); + +//UnaryExpressionTests.ArrayParameter_PostIncrementAssign_works +var _ = (Func)(( + int[] a, + int i) => //int + a[i]++); + +//UnaryExpressionTests.ArrayParameterByRef_PostIncrementAssign_works +var _ = (FuncArrByRef)(( + ref int[] a, + int i) => //int + a[i]++); + +//UnaryExpressionTests.ArrayItemRefParameter_PostIncrementAssign_works +var _ = (FuncByRef)((ref int i) => //int + i++); + +//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Try_compare_strings +var _ = (Func)((string s) => //string +{ + if (s == "42") + { + return "true"; + } + return "false"; +}); + +//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Conditional_with_Equal_true_should_shortcircuit_to_Brtrue_or_Brfalse +var _ = (Func)((bool b) => //string +{ + if (b) + { + return "true"; + } + return "false"; +}); + +//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Should_Deserialize_Simple +var _ = (DeserializerDlg)(( + ref ReadOnlySequence input, + Word @value, + out long bytesRead) => //bool +{ + SequenceReader reader = default; + string wordValue = null; + reader = new SequenceReader(input); + if (ReaderExtensions.TryReadValue( + ref reader, + out wordValue) == false) + { + bytesRead = reader.Consumed; + return false; + } + @value.Value = wordValue; + bytesRead = reader.Consumed; + return true; +}); + +//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Should_Deserialize_Simple +var _ = (DeserializerDlg)(( + ref ReadOnlySequence input, + Simple @value, + out long bytesRead) => //bool +{ + SequenceReader reader = default; + int identifier = default; + Word[] content = null; + byte contentLength = default; + reader = new SequenceReader(input); + if (ReaderExtensions.TryReadValue( + ref reader, + out identifier) == false) + { + bytesRead = reader.Consumed; + return false; + } + if (ReaderExtensions.TryReadValue( + ref reader, + out contentLength) == false) + { + bytesRead = reader.Consumed; + return false; + } + if (Serializer.TryDeserializeValues( + ref reader, + (int)contentLength, + out content) == false) + { + bytesRead = reader.Consumed; + return false; + } + @value.Identifier = identifier; + @value.Sentence = content; + bytesRead = reader.Consumed; + return true; +}); + +//TestTools.C:\dev\FastExpressionCompiler\test\FastExpressionCompiler.LightExpression.UnitTests\NestedLambdasSharedToExpressionCodeStringTest.cs +var Issue478_Debug_info_should_be_included_into_nested_lambdas = (Func)(() => //A + new A( + ((B)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 0, + (Func)(() => //object + new B( + ((C)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //object + new C(((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //object + new D()))))))), + ((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //object + new D()))))))), + ((C)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //object + new C(((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //object + new D()))))))))); + +//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Try_compare_strings +var _ = (Func)((string s) => //string +{ + if (s == "42") + { + return "true"; + } + return "false"; +}); + +//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Conditional_with_Equal_true_should_shortcircuit_to_Brtrue_or_Brfalse +var _ = (Func)((bool b) => //string +{ + if (b) + { + return "true"; + } + return "false"; +}); + +//NestedLambdasSharedToExpressionCodeStringTest.Should_output_a_valid_expression_code +var _ = (Func)(() => //A + new A( + ((B)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 0, + (Func)(() => //object + new B( + ((C)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //object + new C(((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //object + new D()))))))), + ((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //object + new D()))))))), + ((C)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //object + new C(((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //object + new D()))))))))); + +// UnitTests are passing in 400 ms. + +//Issue261_Loop_wih_conditions_fails.Test_serialization_of_the_Dictionary +var _ = (WriteSealed)(( + Dictionary source, + ref BufferedStream stream, + Binary io) => //void +{ + stream.ReserveSize(16); + stream.Write(source._count); + stream.Write(source._freeCount); + stream.Write(source._freeList); + stream.Write(source._version); + int[] tempResult = null; + tempResult = source._buckets; + stream.ReserveSize(1); + if (tempResult == null) + { + stream.Write((byte)0); + goto afterWrite; + } + else + { + stream.Write((byte)1); + } + int length0 = default; + stream.ReserveSize(4); + length0 = tempResult.GetLength(0); + stream.Write(length0); + if (0 == length0) + { + goto skipWrite; + } + io.WriteValuesArray1( + tempResult, + 4); + skipWrite:; + afterWrite:; + finishWrite:; + io.WriteInternal(source._comparer); + Dictionary.Entry[] tempResult_1 = null; + tempResult_1 = source._entries; + stream.ReserveSize(1); + if (tempResult_1 == null) + { + stream.Write((byte)0); + goto afterWrite_1; + } + else + { + stream.Write((byte)1); + } + int length0_1 = default; + stream.ReserveSize(4); + length0_1 = tempResult_1.GetLength(0); + stream.Write(length0_1); + if (0 == length0_1) + { + goto skipWrite_1; + } + int i0 = default; + i0 = length0_1 - 1; + while (true) + { + if (i0 < 0) + { + goto break0; + } + else + { + stream.ReserveSize(8); + stream.Write(tempResult_1[i0].hashCode); + stream.Write(tempResult_1[i0].next); + stream.Write(tempResult_1[i0].key); + stream.Write(tempResult_1[i0].value); + finishWrite_1:; + continue0:; + i0 = i0 - 1; + } + } + break0:; + skipWrite_1:; + afterWrite_1:; + finishWrite_2:; + finishWrite_3:; +}); + +//Issue261_Loop_wih_conditions_fails.Serialize_the_nullable_decimal_array +var _ = (WriteSealed)(( + Nullable[] source, + ref BufferedStream stream, + Binary io) => //void +{ + int length0 = default; + stream.ReserveSize(4); + length0 = source.GetLength(0); + stream.Write(length0); + if (0 == length0) + { + goto skipWrite; + } + int i0 = default; + i0 = length0 - 1; + while (true) + { + if (i0 < 0) + { + goto break0; + } + else + { + stream.ReserveSize(17); + if (source[i0].HasValue) + { + stream.Write((byte)1); + stream.Write(source[i0].Value); + finishWrite:; + } + else + { + stream.Write((byte)0); + } + continue0:; + i0 = i0 - 1; + } + } + break0:; + skipWrite:; + finishWrite_1:; +}); + +//Issue261_Loop_wih_conditions_fails.Test_DictionaryTest_StringDictionary +var _ = (WriteSealed)(( + TestReadonly source, + ref BufferedStream stream, + Binary io) => //void +{ + stream.ReserveSize(4); + stream.Write(source.Value); + finishWrite:; +}); + +//Issue261_Loop_wih_conditions_fails.Test_the_big_re_engineering_test_from_the_Apex_Serializer_with_the_simple_mock_arguments +var _ = (Issue261_Loop_wih_conditions_fails.ReadMethods.ReadSealed)(( + ref Issue261_Loop_wih_conditions_fails.BufferedStream stream, + Issue261_Loop_wih_conditions_fails.Binary io) => //Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[] +{ + Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[] result = null; + int length0 = default; + stream.ReserveSize(4); + length0 = stream.Read(); + result = new Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[length0]; + io.LoadedObjectRefs.Add(result); + int index0 = default; + Issue261_Loop_wih_conditions_fails.ConstructorTests.Test tempResult = null; + index0 = length0 - 1; + while (true) + { + if (index0 < 0) + { + goto void_0; + } + else + { + // { The block result will be assigned to `result[index0]` + tempResult = (Issue261_Loop_wih_conditions_fails.ConstructorTests.Test)null; + stream.ReserveSize(5); + if (stream.Read() == (byte)0) + { + goto skipRead; + } + int refIndex = default; + refIndex = stream.Read(); + if (refIndex != -1) + { + tempResult = (Issue261_Loop_wih_conditions_fails.ConstructorTests.Test)io.LoadedObjectRefs[refIndex - 1]; + goto skipRead; + } + tempResult = new Issue261_Loop_wih_conditions_fails.ConstructorTests.Test(); + io.LoadedObjectRefs.Add(tempResult); + skipRead:; + result[index0] = tempResult; + // } end of block assignment + continue0:; + index0 = index0 - 1; + } + } + void_0:; + return result; +}); + +//Issue261_Loop_wih_conditions_fails.Test_assignment_with_the_block_on_the_right_side_with_just_a_constant +var _ = (Func)(() => //int +{ + int result = default; + // { The block result will be assigned to `result` + int temp = default; + temp = 42; + result = temp; + // } end of block assignment; + return result; +}); + +//Issue261_Loop_wih_conditions_fails.Test_assignment_with_the_block_on_the_right_side +var _ = (Func)(() => //int[] +{ + int[] result = null; + result = new int[1]; + // { The block result will be assigned to `result[0]` + int temp = default; + temp = 42; + result[0] = temp; + // } end of block assignment; + return result; +}); + +//Issue261_Loop_wih_conditions_fails.Test_class_items_array_index_via_variable_access_then_the_member_access +var _ = (Func)(( + Issue261_Loop_wih_conditions_fails.El[] elArr, + int index) => //string +{ + int tempIndex = default; + tempIndex = index; + return elArr[tempIndex].Message; +}); + +//Issue261_Loop_wih_conditions_fails.Test_serialization_of_the_Dictionary +var _ = (WriteSealed)(( + Dictionary source, + ref BufferedStream stream, + Binary io) => //void +{ + stream.ReserveSize(16); + stream.Write(source._count); + stream.Write(source._freeCount); + stream.Write(source._freeList); + stream.Write(source._version); + int[] tempResult = null; + tempResult = source._buckets; + stream.ReserveSize(1); + if (tempResult == null) + { + stream.Write((byte)0); + goto afterWrite; + } + else + { + stream.Write((byte)1); + } + int length0 = default; + stream.ReserveSize(4); + length0 = tempResult.GetLength(0); + stream.Write(length0); + if (0 == length0) + { + goto skipWrite; + } + io.WriteValuesArray1( + tempResult, + 4); + skipWrite:; + afterWrite:; + finishWrite:; + io.WriteInternal(source._comparer); + Dictionary.Entry[] tempResult_1 = null; + tempResult_1 = source._entries; + stream.ReserveSize(1); + if (tempResult_1 == null) + { + stream.Write((byte)0); + goto afterWrite_1; + } + else + { + stream.Write((byte)1); + } + int length0_1 = default; + stream.ReserveSize(4); + length0_1 = tempResult_1.GetLength(0); + stream.Write(length0_1); + if (0 == length0_1) + { + goto skipWrite_1; + } + int i0 = default; + i0 = length0_1 - 1; + while (true) + { + if (i0 < 0) + { + goto break0; + } + else + { + stream.ReserveSize(8); + stream.Write(tempResult_1[i0].hashCode); + stream.Write(tempResult_1[i0].next); + stream.Write(tempResult_1[i0].key); + stream.Write(tempResult_1[i0].value); + finishWrite_1:; + continue0:; + i0 = i0 - 1; + } + } + break0:; + skipWrite_1:; + afterWrite_1:; + finishWrite_2:; + finishWrite_3:; +}); + +//Issue261_Loop_wih_conditions_fails.Serialize_the_nullable_decimal_array +var _ = (WriteSealed)(( + Nullable[] source, + ref BufferedStream stream, + Binary io) => //void +{ + int length0 = default; + stream.ReserveSize(4); + length0 = source.GetLength(0); + stream.Write(length0); + if (0 == length0) + { + goto skipWrite; + } + int i0 = default; + i0 = length0 - 1; + while (true) + { + if (i0 < 0) + { + goto break0; + } + else + { + stream.ReserveSize(17); + if (source[i0].HasValue) + { + stream.Write((byte)1); + stream.Write(source[i0].Value); + finishWrite:; + } + else + { + stream.Write((byte)0); + } + continue0:; + i0 = i0 - 1; + } + } + break0:; + skipWrite:; + finishWrite_1:; +}); + +//Issue261_Loop_wih_conditions_fails.Serialize_the_nullable_decimal_array +var _ = (WriteSealed)(( + Nullable[] source, + ref BufferedStream stream, + Binary io) => //void +{ + int length0 = default; + stream.ReserveSize(4); + length0 = source.GetLength(0); + stream.Write(length0); + if (0 == length0) + { + goto skipWrite; + } + int i0 = default; + i0 = length0 - 1; + while (true) + { + if (i0 < 0) + { + goto break0; + } + else + { + stream.ReserveSize(17); + if (source[i0].HasValue) + { + stream.Write((byte)1); + stream.Write(source[i0].Value); + finishWrite:; + } + else + { + stream.Write((byte)0); + } + continue0:; + i0 = i0 - 1; + } + } + break0:; + skipWrite:; + finishWrite_1:; +}); + +//Issue261_Loop_wih_conditions_fails.Test_DictionaryTest_StringDictionary +var _ = (WriteSealed)(( + TestReadonly source, + ref BufferedStream stream, + Binary io) => //void +{ + stream.ReserveSize(4); + stream.Write(source.Value); + finishWrite:; +}); + +//Issue261_Loop_wih_conditions_fails.Test_the_big_re_engineering_test_from_the_Apex_Serializer_with_the_simple_mock_arguments +var _ = (Issue261_Loop_wih_conditions_fails.ReadMethods.ReadSealed)(( + ref Issue261_Loop_wih_conditions_fails.BufferedStream stream, + Issue261_Loop_wih_conditions_fails.Binary io) => //Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[] +{ + Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[] result = null; + int length0 = default; + stream.ReserveSize(4); + length0 = stream.Read(); + result = new Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[length0]; + io.LoadedObjectRefs.Add(result); + int index0 = default; + Issue261_Loop_wih_conditions_fails.ConstructorTests.Test tempResult = null; + index0 = length0 - 1; + while (true) + { + if (index0 < 0) + { + goto void_0; + } + else + { + // { The block result will be assigned to `result[index0]` + tempResult = (Issue261_Loop_wih_conditions_fails.ConstructorTests.Test)null; + stream.ReserveSize(5); + if (stream.Read() == (byte)0) + { + goto skipRead; + } + int refIndex = default; + refIndex = stream.Read(); + if (refIndex != -1) + { + tempResult = (Issue261_Loop_wih_conditions_fails.ConstructorTests.Test)io.LoadedObjectRefs[refIndex - 1]; + goto skipRead; + } + tempResult = new Issue261_Loop_wih_conditions_fails.ConstructorTests.Test(); + io.LoadedObjectRefs.Add(tempResult); + skipRead:; + result[index0] = tempResult; + // } end of block assignment + continue0:; + index0 = index0 - 1; + } + } + void_0:; + return result; +}); + +//Issue261_Loop_wih_conditions_fails.Test_assignment_with_the_block_on_the_right_side_with_just_a_constant +var _ = (Func)(() => //int +{ + int result = default; + // { The block result will be assigned to `result` + int temp = default; + temp = 42; + result = temp; + // } end of block assignment; + return result; +}); + +//Issue261_Loop_wih_conditions_fails.Test_assignment_with_the_block_on_the_right_side +var _ = (Func)(() => //int[] +{ + int[] result = null; + result = new int[1]; + // { The block result will be assigned to `result[0]` + int temp = default; + temp = 42; + result[0] = temp; + // } end of block assignment; + return result; +}); + +//Issue261_Loop_wih_conditions_fails.Test_class_items_array_index_via_variable_access_then_the_member_access +var _ = (Func)(( + Issue261_Loop_wih_conditions_fails.El[] elArr, + int index) => //string +{ + int tempIndex = default; + tempIndex = index; + return elArr[tempIndex].Message; +}); + +//Issue261_Loop_wih_conditions_fails.Can_make_convert_and_compile_binary_equal_expression_of_different_types +var _ = (Func)(() => //bool + Issue261_Loop_wih_conditions_fails.GetByte() == (byte)0); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_case_2_Full_ExecutionEngineException +T __f(System.Func f) => f(); +var _ = (Func)((Enum15? p) => //int? + p.HasValue ? + __f(() => { + switch ((Enum15)p) + { + case Enum15.AA: + return (int?)10; + case Enum15.BB: + return (int?)20; + default: + return (int?)ConvertBuilder.ConvertDefault( + (object)(Enum15)p, + typeof(int?)); + } + }) : (int?)null); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_287_Case1_ConvertTests_NullableParameterInOperatorConvert_VerificationException +var _ = (Func)((Decimal p) => //CustomMoneyType + (CustomMoneyType)new Decimal?(p)); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_287_Case2_SimpleDelegate_as_nested_lambda_in_TesCollection_test +var _ = (Action)((SampleClass sampleClass_0) => //void +{ + sampleClass_0.add_SimpleDelegateEvent((SimpleDelegate)((string _) => //void + { + (default(SimpleDelegate)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( + _); + })); +}); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case6_MappingSchemaTests_CultureInfo_VerificationException +var _ = (Func)((DateTime v) => //string + v.ToString(default(c__DisplayClass41_0)/*NOTE: Provide the non-default value for the Constant!*/.info.DateTimeFormat)); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case5_ConvertTests_NullableIntToNullableEnum_NullReferenceException +var _ = (Func)((int? p) => //Enum1? + p.HasValue ? + (Enum1?)p.Value : (Enum1?)null); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case3_SecurityVerificationException +var _ = (Func)(( + SampleClass s, + int i) => //string + s.GetOther(i).OtherStrProp); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case2_NullRefException +var _ = (Func)(( + Expression expr, + IDataContext dctx, + object[] ps) => //object + (object)ConvertTo.From(((c__DisplayClass6_0)((ConstantExpression)((MemberExpression)((UnaryExpression)((MethodCallExpression)((LambdaExpression)((UnaryExpression)((MethodCallExpression)expr).Arguments.Item).Operand).Body).Arguments.Item).Operand).Expression).Value).flag)); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case2_Minimal_NullRefException +var _ = (Func)((object o) => //object + (object)((c__DisplayClass6_0)o).flag); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_case_4_simplified_InvalidCastException +var _ = (Func)(() => //SimpleDelegate + (SimpleDelegate)(new Delegate[]{null})[0]); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_case_4_Full_InvalidCastException +var _ = (Func)((object object_0) => //object +{ + SampleClass sampleClass_1 = null; + sampleClass_1 = new SampleClass( + object_0, + new Delegate[]{default(Func)/*NOTE: Provide the non-default value for the Constant!*/, default(Func)/*NOTE: Provide the non-default value for the Constant!*/, default(Action)/*NOTE: Provide the non-default value for the Constant!*/, default(SimpleDelegate)/*NOTE: Provide the non-default value for the Constant!*/, default(Func)/*NOTE: Provide the non-default value for the Constant!*/}); + (default(Action)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( + sampleClass_1); + return sampleClass_1; +}); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_case_3_Full_NullReferenceException +var _ = (Func>)(( + IQueryRunner qr, + IDataReader dr) => //IGrouping + ((Func>)(( + IQueryRunner qr_1, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps, + object[] preamble) => //IGrouping + { + SQLiteDataReader ldr = null; + ldr = (SQLiteDataReader)dr; + return GroupByHelper>.GetGrouping( + qr_1, + dctx, + rd, + default(List)/*NOTE: Provide the non-default value for the Constant!*/, + expr, + ps, + (Func)(( + IQueryRunner qr_1, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps) => //bool + ldr.IsDBNull(0) ? false : + (bool)ConvertBuilder.ConvertDefault( + (object)ldr.GetInt64(0), + typeof(bool))), + (Func>)null); + })) + .Invoke( + qr, + qr.DataContext, + dr, + qr.Expression, + qr.Parameters, + qr.Preambles)); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_case_1_Full_AccessViolationException +var _ = (Func>)(( + IQueryRunner qr, + IDataReader dr) => //f__AnonymousType142 + ((Func>)(( + IQueryRunner qr_1, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps, + object[] preamble) => //f__AnonymousType142 + { + SQLiteDataReader ldr = null; + f__AnonymousType142 f__AnonymousType142_int___0 = null; + ldr = (SQLiteDataReader)dr; + f__AnonymousType142_int___0 = new f__AnonymousType142((((ldr.IsDBNull(0) ? (int?)null : + new int?(ldr.GetInt32(0))) != (int?)null) ? + ldr.IsDBNull(0) ? (int?)null : + new int?(ldr.GetInt32(0)) : (int?)100)); + return f__AnonymousType142_int___0; + })) + .Invoke( + qr, + qr.DataContext, + dr, + qr.Expression, + qr.Parameters, + qr.Preambles)); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_case_2_Full_ExecutionEngineException +T __f(System.Func f) => f(); +var _ = (Func)((Enum15? p) => //int? + p.HasValue ? + __f(() => { + switch ((Enum15)p) + { + case Enum15.AA: + return (int?)10; + case Enum15.BB: + return (int?)20; + default: + return (int?)ConvertBuilder.ConvertDefault( + (object)(Enum15)p, + typeof(int?)); + } + }) : (int?)null); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_287_Case1_ConvertTests_NullableParameterInOperatorConvert_VerificationException +var _ = (Func)((Decimal p) => //CustomMoneyType + (CustomMoneyType)new Decimal?(p)); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_287_Case2_SimpleDelegate_as_nested_lambda_in_TesCollection_test +var _ = (Action)((SampleClass sampleClass_0) => //void +{ + sampleClass_0.add_SimpleDelegateEvent((SimpleDelegate)((string _) => //void + { + (default(SimpleDelegate)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( + _); + })); +}); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case6_MappingSchemaTests_CultureInfo_VerificationException +var _ = (Func)((DateTime v) => //string + v.ToString(default(c__DisplayClass41_0)/*NOTE: Provide the non-default value for the Constant!*/.info.DateTimeFormat)); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case5_ConvertTests_NullableIntToNullableEnum_NullReferenceException +var _ = (Func)((int? p) => //Enum1? + p.HasValue ? + (Enum1?)p.Value : (Enum1?)null); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case3_SecurityVerificationException +var _ = (Func)(( + SampleClass s, + int i) => //string + s.GetOther(i).OtherStrProp); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case2_NullRefException +var _ = (Func)(( + Expression expr, + IDataContext dctx, + object[] ps) => //object + (object)ConvertTo.From(((c__DisplayClass6_0)((ConstantExpression)((MemberExpression)((UnaryExpression)((MethodCallExpression)((LambdaExpression)((UnaryExpression)((MethodCallExpression)expr).Arguments.Item).Operand).Body).Arguments.Item).Operand).Expression).Value).flag)); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case2_Minimal_NullRefException +var _ = (Func)((object o) => //object + (object)((c__DisplayClass6_0)o).flag); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_case_4_simplified_InvalidCastException +var _ = (Func)(() => //SimpleDelegate + (SimpleDelegate)(new Delegate[]{null})[0]); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_case_4_Full_InvalidCastException +var _ = (Func)((object object_0) => //object +{ + SampleClass sampleClass_1 = null; + sampleClass_1 = new SampleClass( + object_0, + new Delegate[]{default(Func)/*NOTE: Provide the non-default value for the Constant!*/, default(Func)/*NOTE: Provide the non-default value for the Constant!*/, default(Action)/*NOTE: Provide the non-default value for the Constant!*/, default(SimpleDelegate)/*NOTE: Provide the non-default value for the Constant!*/, default(Func)/*NOTE: Provide the non-default value for the Constant!*/}); + (default(Action)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( + sampleClass_1); + return sampleClass_1; +}); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_case_3_Full_NullReferenceException +var _ = (Func>)(( + IQueryRunner qr, + IDataReader dr) => //IGrouping + ((Func>)(( + IQueryRunner qr_1, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps, + object[] preamble) => //IGrouping + { + SQLiteDataReader ldr = null; + ldr = (SQLiteDataReader)dr; + return GroupByHelper>.GetGrouping( + qr_1, + dctx, + rd, + default(List)/*NOTE: Provide the non-default value for the Constant!*/, + expr, + ps, + (Func)(( + IQueryRunner qr_1, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps) => //bool + ldr.IsDBNull(0) ? false : + (bool)ConvertBuilder.ConvertDefault( + (object)ldr.GetInt64(0), + typeof(bool))), + (Func>)null); + })) + .Invoke( + qr, + qr.DataContext, + dr, + qr.Expression, + qr.Parameters, + qr.Preambles)); + +//Issue274_Failing_Expressions_in_Linq2DB.Test_case_1_Full_AccessViolationException +var _ = (Func>)(( + IQueryRunner qr, + IDataReader dr) => //f__AnonymousType142 + ((Func>)(( + IQueryRunner qr_1, + IDataContext dctx, + IDataReader rd, + Expression expr, + object[] ps, + object[] preamble) => //f__AnonymousType142 + { + SQLiteDataReader ldr = null; + f__AnonymousType142 f__AnonymousType142_int___0 = null; + ldr = (SQLiteDataReader)dr; + f__AnonymousType142_int___0 = new f__AnonymousType142((((ldr.IsDBNull(0) ? (int?)null : + new int?(ldr.GetInt32(0))) != (int?)null) ? + ldr.IsDBNull(0) ? (int?)null : + new int?(ldr.GetInt32(0)) : (int?)100)); + return f__AnonymousType142_int___0; + })) + .Invoke( + qr, + qr.DataContext, + dr, + qr.Expression, + qr.Parameters, + qr.Preambles)); + +//Issue281_Index_Out_of_Range.Index_Out_of_Range +var _ = (Func, int, string>)(( + List list_string__0, + int int_1) => //string + list_string__0[int_1].ToString()); + +//Issue281_Index_Out_of_Range.Index_Out_of_Range +var _ = (Func, int, string>)(( + List list_string__0, + int int_1) => //string + list_string__0[int_1].ToString()); + +//Issue284_Invalid_Program_after_Coalesce.New_test +var _ = (Func)(( + Variable issue284_Invalid_Program_after_Coalesce_Variable_0, + string string_1) => //Variable +{ + _ = issue284_Invalid_Program_after_Coalesce_Variable_0 ?? new Variable("default"); + issue284_Invalid_Program_after_Coalesce_Variable_0.Name = string_1; + return issue284_Invalid_Program_after_Coalesce_Variable_0; +}); + +//Issue284_Invalid_Program_after_Coalesce.Invalid_expression_with_Coalesce_when_invoked_should_throw_NullRef_the_same_as_system_compiled +var _ = (Func)(( + Variable variable_0, + string string_1) => //Variable +{ + _ = variable_0 ?? new Variable("default"); + variable_0.Name = string_1; + return variable_0; +}); + +//Issue284_Invalid_Program_after_Coalesce.Invalid_Program_after_Coalesce +var _ = (Func)(( + Variable variable_0, + string string_1) => //Variable +{ + variable_0 = variable_0 ?? new Variable("default"); + variable_0.Name = string_1; + return variable_0; +}); + +//Issue284_Invalid_Program_after_Coalesce.Coalesce_in_Assign_in_Block +var _ = (Func)(( + Variable variable_0, + string string_1) => //Variable +{ + variable_0 = variable_0 ?? new Variable("default"); + return variable_0; +}); + +//Issue284_Invalid_Program_after_Coalesce.New_test +var _ = (Func)(( + Variable issue284_Invalid_Program_after_Coalesce_Variable_0, + string string_1) => //Variable +{ + _ = issue284_Invalid_Program_after_Coalesce_Variable_0 ?? new Variable("default"); + issue284_Invalid_Program_after_Coalesce_Variable_0.Name = string_1; + return issue284_Invalid_Program_after_Coalesce_Variable_0; +}); + +//Issue284_Invalid_Program_after_Coalesce.Invalid_expression_with_Coalesce_when_invoked_should_throw_NullRef_the_same_as_system_compiled +var _ = (Func)(( + Variable variable_0, + string string_1) => //Variable +{ + _ = variable_0 ?? new Variable("default"); + variable_0.Name = string_1; + return variable_0; +}); + +//Issue284_Invalid_Program_after_Coalesce.Invalid_Program_after_Coalesce +var _ = (Func)(( + Variable variable_0, + string string_1) => //Variable +{ + variable_0 = variable_0 ?? new Variable("default"); + variable_0.Name = string_1; + return variable_0; +}); + +//Issue284_Invalid_Program_after_Coalesce.Coalesce_in_Assign_in_Block +var _ = (Func)(( + Variable variable_0, + string string_1) => //Variable +{ + variable_0 = variable_0 ?? new Variable("default"); + return variable_0; +}); + +//Issue293_Recursive_Methods.Test_Recursive_Expression +var _ = (Func)((int n) => //int +{ + Func[] facs = null; + Func fac = null; + facs = new Func[1]; + fac = (Func)((int n) => //int + (n <= 1) ? 1 : + n * (facs[0]).Invoke( + n - 1)); + facs[0] = fac; + return fac.Invoke( + n); +}); + +//Issue293_Recursive_Methods.Test_Recursive_Expression +var _ = (Func)((int n) => //int +{ + Func[] facs = null; + Func fac = null; + facs = new Func[1]; + fac = (Func)((int n) => //int + (n <= 1) ? 1 : + n * (facs[0]).Invoke( + n - 1)); + facs[0] = fac; + return fac.Invoke( + n); +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Invoke_Lambda_inlining_case +var _ = (Func)(( + Post post_0, + Post post_1) => //Post +{ + Post result = null; + if (post_0 == (Post)null) + { + return (Post)null; + } + result = post_1 ?? new Post(); + result.Dic = ((Func, IDictionary, IDictionary>)(( + IDictionary iDictionary_string__string__2, + IDictionary iDictionary_string__string__3) => //IDictionary + { + IDictionary result_1 = null; + if (iDictionary_string__string__2 == (IDictionary)null) + { + return (IDictionary)null; + } + result_1 = iDictionary_string__string__3 ?? new Dictionary(); + result_1["Secret"] = (string)null; + if (object.ReferenceEquals( + iDictionary_string__string__2, + result_1)) + { + return result_1; + } + IEnumerator> enumerator = null; + enumerator = iDictionary_string__string__2.GetEnumerator(); + while (true) + { + if (enumerator.MoveNext()) + { + KeyValuePair kvp = default; + kvp = enumerator.Current; + string key = null; + key = kvp.Key; + result_1[key] = kvp.Value; + } + else + { + goto LoopBreak; + } + } + LoopBreak:; + iDictionary_string__string__0:; + return result_1; + })) + .Invoke( + post_0.Dic, + result.Dic); + result.Secret = (string)null; + return result; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Invoke_Lambda_inlining_case_simplified +var _ = (Func)((Post post) => //Post +{ + post.Dic = ((Func, IDictionary>)((IDictionary dict) => //IDictionary + { + return dict; + })) + .Invoke( + post.Dic); + return post; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_300 +var _ = (Func)(( + Customer customer_0, + CustomerDTO customerDTO_1) => //CustomerDTO +{ + CustomerDTO result = null; + if (customer_0 == (Customer)null) + { + return (CustomerDTO)null; + } + result = customerDTO_1 ?? new CustomerDTO(); + result.Id = customer_0.Id; + result.Name = customer_0.Name; + result.Address = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( + customer_0.Address, + result.Address); + result.HomeAddress = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( + customer_0.HomeAddress, + result.HomeAddress); + result.Addresses = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( + customer_0.Addresses, + result.Addresses); + result.WorkAddresses = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction, List>().Invoke( + customer_0.WorkAddresses, + result.WorkAddresses); + result.AddressCity = (customer_0.Address == (Address)null) ? (string)null : + customer_0.Address.City; + return result; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_MemberInit_PrivateProperty +var _ = (Func)((object object_0) => //CustomerDTO2 +{ + CustomerWithPrivateProperty customerWithPrivateProperty_1 = null; + customerWithPrivateProperty_1 = (CustomerWithPrivateProperty)object_0; + return (customerWithPrivateProperty_1 == (CustomerWithPrivateProperty)null) ? (CustomerDTO2)null : + new CustomerDTO2() + { + Id = customerWithPrivateProperty_1.Id, + Name = customerWithPrivateProperty_1.Name + }; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_MemberInit_InternalProperty +var _ = (Func)((SimplePoco simplePoco_0) => //SimpleDto + (simplePoco_0 == (SimplePoco)null) ? (SimpleDto)null : + new SimpleDto() + { + Id = simplePoco_0.Id, + Name = simplePoco_0.Name + }); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_not_return_when_followup_expression_is_present +var _ = (Func)(() => //int +{ + goto void_0; + void_0:; + return 42; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_not_return_when_followup_expression_is_present_Custom_constant_output +var _ = (Func)(() => //Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Post +{ + goto void_0; + void_0:; + return new Post { Secret = "b" }; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_return_the_goto_value_when_no_other_expressions_is_present +var _ = (Func)(() => //int +{ + return 22; + int_0:; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Dictionary_case +var _ = (Func>)((object object_0) => //Dictionary +{ + SimplePoco simplePoco_1 = null; + simplePoco_1 = (SimplePoco)object_0; + return (simplePoco_1 == (SimplePoco)null) ? (Dictionary)null : + new Dictionary() + { + {"Id", (object)simplePoco_1.Id}, + {"Name", (simplePoco_1.Name == (string)null) ? null : + (object)simplePoco_1.Name} + }; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_TryCatch_case +var _ = (Func)((object object_0) => //Test +{ + Test test_1 = null; + test_1 = (Test)object_0; + MapContextScope scope = null; + if (test_1 == (Test)null) + { + return (Test)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + Test result = null; + references = scope.Context.References; + key = new ReferenceTuple( + test_1, + typeof(Test)); + if (references.TryGetValue( + key, + out cache)) + { + return (Test)cache; + } + result = new Test(); + references[key] = (object)result; + result.TestString = test_1.TestString; + return result; + } + finally + { + scope.Dispose(); + } + issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Test_0:; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301 +var _ = (Func)((Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Address[] issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0) => //Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[] +{ + Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[] result = null; + if (issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0 == (Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Address[])null) + { + return (Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[])null; + } + result = new AddressDTO[issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0.Length]; + int v = default; + v = 0; + int i = default; + int len = default; + i = 0; + len = issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0.Length; + while (true) + { + if (i < len) + { + Address item = null; + item = issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0[i]; + result[v++] = (item == (Address)null) ? (AddressDTO)null : + new AddressDTO() + { + Id = item.Id, + City = item.City, + Country = item.Country + }; + i++; + } + else + { + goto LoopBreak; + } + } + LoopBreak:; + return result; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Invoke_Lambda_inlining_case +var _ = (Func)(( + Post post_0, + Post post_1) => //Post +{ + Post result = null; + if (post_0 == (Post)null) + { + return (Post)null; + } + result = post_1 ?? new Post(); + result.Dic = ((Func, IDictionary, IDictionary>)(( + IDictionary iDictionary_string__string__2, + IDictionary iDictionary_string__string__3) => //IDictionary + { + IDictionary result_1 = null; + if (iDictionary_string__string__2 == (IDictionary)null) + { + return (IDictionary)null; + } + result_1 = iDictionary_string__string__3 ?? new Dictionary(); + result_1["Secret"] = (string)null; + if (object.ReferenceEquals( + iDictionary_string__string__2, + result_1)) + { + return result_1; + } + IEnumerator> enumerator = null; + enumerator = iDictionary_string__string__2.GetEnumerator(); + while (true) + { + if (enumerator.MoveNext()) + { + KeyValuePair kvp = default; + kvp = enumerator.Current; + string key = null; + key = kvp.Key; + result_1[key] = kvp.Value; + } + else + { + goto LoopBreak; + } + } + LoopBreak:; + iDictionary_string__string__0:; + return result_1; + })) + .Invoke( + post_0.Dic, + result.Dic); + result.Secret = (string)null; + return result; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Invoke_Lambda_inlining_case_simplified +var _ = (Func)((Post post) => //Post +{ + post.Dic = ((Func, IDictionary>)((IDictionary dict) => //IDictionary + { + return dict; + })) + .Invoke( + post.Dic); + return post; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_300 +var _ = (Func)(( + Customer customer_0, + CustomerDTO customerDTO_1) => //CustomerDTO +{ + CustomerDTO result = null; + if (customer_0 == (Customer)null) + { + return (CustomerDTO)null; + } + result = customerDTO_1 ?? new CustomerDTO(); + result.Id = customer_0.Id; + result.Name = customer_0.Name; + result.Address = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( + customer_0.Address, + result.Address); + result.HomeAddress = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( + customer_0.HomeAddress, + result.HomeAddress); + result.Addresses = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( + customer_0.Addresses, + result.Addresses); + result.WorkAddresses = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction, List>().Invoke( + customer_0.WorkAddresses, + result.WorkAddresses); + result.AddressCity = (customer_0.Address == (Address)null) ? (string)null : + customer_0.Address.City; + return result; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_MemberInit_PrivateProperty +var _ = (Func)((object object_0) => //CustomerDTO2 +{ + CustomerWithPrivateProperty customerWithPrivateProperty_1 = null; + customerWithPrivateProperty_1 = (CustomerWithPrivateProperty)object_0; + return (customerWithPrivateProperty_1 == (CustomerWithPrivateProperty)null) ? (CustomerDTO2)null : + new CustomerDTO2() + { + Id = customerWithPrivateProperty_1.Id, + Name = customerWithPrivateProperty_1.Name + }; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_MemberInit_InternalProperty +var _ = (Func)((SimplePoco simplePoco_0) => //SimpleDto + (simplePoco_0 == (SimplePoco)null) ? (SimpleDto)null : + new SimpleDto() + { + Id = simplePoco_0.Id, + Name = simplePoco_0.Name + }); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_not_return_when_followup_expression_is_present +var _ = (Func)(() => //int +{ + goto void_0; + void_0:; + return 42; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_not_return_when_followup_expression_is_present_Custom_constant_output +var _ = (Func)(() => //Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Post +{ + goto void_0; + void_0:; + return new Post { Secret = "b" }; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_return_the_goto_value_when_no_other_expressions_is_present +var _ = (Func)(() => //int +{ + return 22; + int_0:; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Dictionary_case +var _ = (Func>)((object object_0) => //Dictionary +{ + SimplePoco simplePoco_1 = null; + simplePoco_1 = (SimplePoco)object_0; + return (simplePoco_1 == (SimplePoco)null) ? (Dictionary)null : + new Dictionary() + { + {"Id", (object)simplePoco_1.Id}, + {"Name", (simplePoco_1.Name == (string)null) ? null : + (object)simplePoco_1.Name} + }; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_TryCatch_case +var _ = (Func)((object object_0) => //Test +{ + Test test_1 = null; + test_1 = (Test)object_0; + MapContextScope scope = null; + if (test_1 == (Test)null) + { + return (Test)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + Test result = null; + references = scope.Context.References; + key = new ReferenceTuple( + test_1, + typeof(Test)); + if (references.TryGetValue( + key, + out cache)) + { + return (Test)cache; + } + result = new Test(); + references[key] = (object)result; + result.TestString = test_1.TestString; + return result; + } + finally + { + scope.Dispose(); + } + issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Test_0:; +}); + +//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301 +var _ = (Func)((Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Address[] issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0) => //Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[] +{ + Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[] result = null; + if (issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0 == (Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Address[])null) + { + return (Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[])null; + } + result = new AddressDTO[issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0.Length]; + int v = default; + v = 0; + int i = default; + int len = default; + i = 0; + len = issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0.Length; + while (true) + { + if (i < len) + { + Address item = null; + item = issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0[i]; + result[v++] = (item == (Address)null) ? (AddressDTO)null : + new AddressDTO() + { + Id = item.Id, + City = item.City, + Country = item.Country + }; + i++; + } + else + { + goto LoopBreak; + } + } + LoopBreak:; + return result; +}); + +//Issue302_Error_compiling_expression_with_array_access.Test1 +var _ = (Func)((LinqTestModel m) => //int + (m.Array)[default(c__DisplayClass1_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.counter].ValorInt); + +//Issue302_Error_compiling_expression_with_array_access.Test1 +var _ = (Func)((LinqTestModel m) => //int + (m.Array)[default(c__DisplayClass1_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.counter].ValorInt); + +//Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing.Test_double_array_index_access +var _ = (Func)(() => //double +{ + double[] arr = null; + arr = new double[1]; + arr[0] = 123.456; + default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0]); + default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0]); + return arr[0]; +}); + +//Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing.Test_double_array_index_access_and_instance_call +var _ = (Func)(() => //double +{ + double[] arr = null; + arr = new double[1]; + arr[0] = 123.456; + default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0].CompareTo(123.456)); + default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0].CompareTo(123.456)); + return arr[0]; +}); + +//Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing.Test_double_array_index_access +var _ = (Func)(() => //double +{ + double[] arr = null; + arr = new double[1]; + arr[0] = 123.456; + default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0]); + default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0]); + return arr[0]; +}); + +//Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing.Test_double_array_index_access_and_instance_call +var _ = (Func)(() => //double +{ + double[] arr = null; + arr = new double[1]; + arr[0] = 123.456; + default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0].CompareTo(123.456)); + default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0].CompareTo(123.456)); + return arr[0]; +}); + +//Issue307_Switch_with_fall_through_throws_InvalidProgramException.Test1 +var _ = (Func)((int p) => //string +{ + switch (p) + { + case 1: + case 2: + return "foo"; + break; + default: + return "bar"; + break; + } + string_0:; +}); + +//Issue307_Switch_with_fall_through_throws_InvalidProgramException.Test1 +var _ = (Func)((int p) => //string +{ + switch (p) + { + case 1: + case 2: + return "foo"; + break; + default: + return "bar"; + break; + } + string_0:; +}); + +//Issue308_Wrong_delegate_type_returned_with_closure.Test1 +var _ = (Func)((string vm) => //Command + (Command)(() => //string + vm)); + +//Issue308_Wrong_delegate_type_returned_with_closure.Test1 +var _ = (Func)((string vm) => //Command + (Command)(() => //string + vm)); + +//Issue309_InvalidProgramException_with_MakeBinary_liftToNull_true.Test1 +var _ = (Func)(() => //object + (object)((int?)null > (int?)10)); + +//Issue309_InvalidProgramException_with_MakeBinary_liftToNull_true.Test1 +var _ = (Func)(() => //object + (object)((int?)null > (int?)10)); + +//Issue316_in_parameter.Test_constructor_in_struct_parameter_constant +var _ = (Action)(() => //void +{ + throw new ParseException( + "314", + default(TextPosition)/*NOTE: Provide the non-default value for the Constant!*/); +}); + +//Issue316_in_parameter.Test_method_in_struct_parameter_constant +var _ = (Action)(() => //void +{ + ThrowParseException(default(TextPosition)/*NOTE: Provide the non-default value for the Constant!*/); +}); + +//Issue316_in_parameter.Test_constructor_in_struct_parameter_constant +var _ = (Action)(() => //void +{ + throw new ParseException( + "314", + default(TextPosition)/*NOTE: Provide the non-default value for the Constant!*/); +}); + +//Issue316_in_parameter.Test_method_in_struct_parameter_constant +var _ = (Action)(() => //void +{ + ThrowParseException(default(TextPosition)/*NOTE: Provide the non-default value for the Constant!*/); +}); + +//Issue316_in_parameter.Test_constructor_in_struct_parameter_constant_with_NoArgByRef_New +var _ = (Action)(() => //void +{ + throw new ParseExceptionNoByRefArgs( + "314", + default(TextPosition)/*NOTE: Provide the non-default value for the Constant!*/); +}); + +//Issue320_Bad_label_content_in_ILGenerator_when_creating_through_DynamicModule.Test_instance_call +var _ = (Func)(() => //int +{ + int ret = default; + if (true) + { + ret = new TestMethods(314).InstanceMethod(); + } + int_0:; + return ret; +}); + +//Issue320_Bad_label_content_in_ILGenerator_when_creating_through_DynamicModule.Test_instance_call +var _ = (Func)(() => //int +{ + int ret = default; + if (true) + { + ret = new TestMethods(314).InstanceMethod(); + } + int_0:; + return ret; +}); + +//Issue321_Call_with_out_parameter_to_field_type_that_is_not_value_type_fails.Test_outparameter +var _ = (Action)(() => //void +{ + TestStringOutMethod( + "hello world", + out default(TestPOD)/*NOTE: Provide the non-default value for the Constant!*/.stringvalue); + TestIntOutMethod( + 4, + out default(TestPOD)/*NOTE: Provide the non-default value for the Constant!*/.intvalue); +}); + +//Issue321_Call_with_out_parameter_to_field_type_that_is_not_value_type_fails.Test_outparameter +var _ = (Action)(() => //void +{ + TestStringOutMethod( + "hello world", + out default(TestPOD)/*NOTE: Provide the non-default value for the Constant!*/.stringvalue); + TestIntOutMethod( + 4, + out default(TestPOD)/*NOTE: Provide the non-default value for the Constant!*/.intvalue); +}); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_member_not_equal_to_null_inside_predicate +var _ = (Func)((Test t) => //bool + Enumerable.Any( + t.A, + (Func)((Test2 e) => //bool + e.Value != (Decimal?)null))); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a == (Decimal?)0m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a != (Decimal?)0m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a > (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a >= (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a <= (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a < (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a <= (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a > (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a != (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a == (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a != (Decimal?)1.366m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a == (Decimal?)1.366m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a == (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a != (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a == b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a != b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a > b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a >= b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a <= b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a < b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a <= b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a > b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a != b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a == b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a != b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a == b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a == b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a != b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_to_zero +var _ = (Func)((Decimal? n) => //bool + n != ((Decimal?)0m)); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_greater_than_zero +var _ = (Func)((Decimal? n) => //bool + n > ((Decimal?)0m)); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_decimal +var _ = (Func)((Decimal? n) => //bool + n != ((Decimal?)1.11m)); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_less_then_decimal +var _ = (Func)((Decimal? n) => //bool + n < ((Decimal?)1.11m)); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_to_null +var _ = (Func)((Decimal? n) => //bool + n != (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Null_not_equal_to_nullable_decimal +var _ = (Func)((Decimal? n) => //bool + (Decimal?)null != n); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_equal_to_null +var _ = (Func)((Decimal? n) => //bool + n == (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_member_not_equal_to_null +var _ = (Func)((Test2 t) => //bool + t.Value != (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_member_not_equal_to_null_inside_predicate +var _ = (Func)((Test t) => //bool + Enumerable.Any( + t.A, + (Func)((Test2 e) => //bool + e.Value != (Decimal?)null))); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a == (Decimal?)0m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a != (Decimal?)0m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a > (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a >= (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a <= (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a < (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a <= (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a > (Decimal?)1.11m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a != (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a == (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a != (Decimal?)1.366m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a == (Decimal?)1.366m); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a == (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases +var _ = (Func)((Decimal? a) => //bool + a != (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a == b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a != b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a > b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a >= b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a <= b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a < b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a <= b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a > b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a != b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a == b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a != b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a == b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a == b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases +var _ = (Func)(( + Decimal? a, + Decimal? b) => //bool + a != b); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_to_zero +var _ = (Func)((Decimal? n) => //bool + n != ((Decimal?)0m)); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_greater_than_zero +var _ = (Func)((Decimal? n) => //bool + n > ((Decimal?)0m)); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_decimal +var _ = (Func)((Decimal? n) => //bool + n != ((Decimal?)1.11m)); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_less_then_decimal +var _ = (Func)((Decimal? n) => //bool + n < ((Decimal?)1.11m)); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_to_null +var _ = (Func)((Decimal? n) => //bool + n != (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Null_not_equal_to_nullable_decimal +var _ = (Func)((Decimal? n) => //bool + (Decimal?)null != n); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_equal_to_null +var _ = (Func)((Decimal? n) => //bool + n == (Decimal?)null); + +//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_member_not_equal_to_null +var _ = (Func)((Test2 t) => //bool + t.Value != (Decimal?)null); + +//Issue346_Is_it_possible_to_implement_ref_local_variables.Check_assignment_to_by_ref_float_parameter_PostIncrement_Returning +var _ = (IncRefFloatReturning)((ref float x) => //float +{ + return x++; +}); + +//Issue346_Is_it_possible_to_implement_ref_local_variables.Check_assignment_to_by_ref_int_parameter_PostIncrement_Returning +var _ = (IncRefintReturning)((ref int x) => //int +{ + return x++; +}); + +//Issue346_Is_it_possible_to_implement_ref_local_variables.Check_assignment_to_by_ref_int_parameter_PostIncrement_Void +var _ = (IncRefInt)((ref int x) => //void +{ + x++; +}); + +//Issue346_Is_it_possible_to_implement_ref_local_variables.Get_array_element_ref_and_member_change_and_Pre_increment_it +var _ = (Func)((Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] aPar) => //int +{ + Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] aVar = null; + int i = default; + Vector3 v__discard_init_by_ref = default; ref var v = ref v__discard_init_by_ref; + aVar = aPar; + i = 9; + v = ref aVar[i]; + return ++v.x; +}); + +//Issue346_Is_it_possible_to_implement_ref_local_variables.Get_array_element_ref_and_member_change_and_Post_increment_it +var _ = (Func)((Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] aPar) => //int +{ + Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] aVar = null; + int i = default; + Vector3 v__discard_init_by_ref = default; ref var v = ref v__discard_init_by_ref; + aVar = aPar; + i = 9; + v = ref aVar[i]; + return v.x++; +}); + +//Issue346_Is_it_possible_to_implement_ref_local_variables.Real_world_test_ref_array_element +var _ = (Func)(() => //Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] +{ + Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] array = null; + int i = default; + array = new Vector3[100]; + i = 0; + while (true) + { + if (i < array.Length) + { + Vector3 v__discard_init_by_ref = default; ref var v = ref v__discard_init_by_ref; + v = ref array[i]; + v.x += 12; + v.Normalize(); + ++i; + } + else + { + goto void_0; + } + } + void_0:; + return array; +}); + +//Issue346_Is_it_possible_to_implement_ref_local_variables.Get_array_element_ref_and_member_change_and_increment_it_then_method_call_on_ref_value_elem +var _ = (Func)(() => //Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] +{ + Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] a = null; + int i = default; + Vector3 v__discard_init_by_ref = default; ref var v = ref v__discard_init_by_ref; + a = new Vector3[10]; + i = 0; + v = ref a[i]; + v.x += 12; + v.Normalize(); + return a; +}); + +//Issue346_Is_it_possible_to_implement_ref_local_variables.Get_array_element_ref_and_member_change_and_increment_it +var _ = (Func)(() => //Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] +{ + Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] a = null; + int i = default; + Vector3 v__discard_init_by_ref = default; ref var v = ref v__discard_init_by_ref; + a = new Vector3[10]; + i = 0; + v = ref a[i]; + v.x += 12; + return a; +}); + +//Issue346_Is_it_possible_to_implement_ref_local_variables.Get_array_element_ref_and_increment_it +var _ = (Action)((int[] a) => //void +{ + int n__discard_init_by_ref = default; ref var n = ref n__discard_init_by_ref; + n = ref a[0]; + n += 1; +}); + +//Issue346_Is_it_possible_to_implement_ref_local_variables.Check_assignment_to_by_ref_int_parameter_PlusOne +var _ = (IncRefInt)((ref int x) => //void +{ + x += 1; +}); + +//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Issue478_Test_diagnostics +var _ = (Func>)((int n) => //Func + (Func)(() => //int + n + 1)); + +//TestTools.C:\dev\FastExpressionCompiler\test\FastExpressionCompiler.IssueTests\Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.cs +var Issue478_Test_diagnostics = (Func>)((int n) => //Func + (Func)(() => //int + n + 1)); + +//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_struct_parameter_in_closure_of_the_nested_lambda +var _ = (Func)((NotifyModel m) => //int + Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int + m.Number1))); + +//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_passing_struct_item_in_object_array_parameter +var _ = (Func)((object[] arr) => //int + ((NotifyModel)arr[0]).Number1); + +//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_nullable_param_in_closure_of_the_nested_lambda +var _ = (Func)((int? p) => //int + Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int + p.Value))); + +//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_nullable_of_struct_and_struct_field_in_the_nested_lambda +var _ = (Func)((NotifyContainer? p) => //int + Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int + p.Value.model.Number1))); + +//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Issue478_Test_diagnostics +var _ = (Func>)((int n) => //Func + (Func)(() => //int + n + 1)); + +//TestTools.C:\dev\FastExpressionCompiler\test\FastExpressionCompiler.IssueTests\Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.cs +var Issue478_Test_diagnostics = (Func>)((int n) => //Func + (Func)(() => //int + n + 1)); + +//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_struct_parameter_in_closure_of_the_nested_lambda +var _ = (Func)((NotifyModel m) => //int + Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int + m.Number1))); + +//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_passing_struct_item_in_object_array_parameter +var _ = (Func)((object[] arr) => //int + ((NotifyModel)arr[0]).Number1); + +//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_nullable_param_in_closure_of_the_nested_lambda +var _ = (Func)((int? p) => //int + Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int + p.Value))); + +//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_nullable_of_struct_and_struct_field_in_the_nested_lambda +var _ = (Func)((NotifyContainer? p) => //int + Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int + p.Value.model.Number1))); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Add +var _ = (Action)((int[] a) => //void +{ + a[1] = a[1] + 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_PlusOne +var _ = (Action)((int[] a) => //void +{ + a[2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_IndexerAccess_Assign_InAction +var _ = (Action)((ArrVal a) => //void +{ + a["b", 2] = 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_IndexerAccess_AddAssign_PlusOne_InAction +var _ = (RefArrVal)((ref ArrVal a) => //void +{ + a["b", 2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_IndexerAccess_AddAssign_PlusOne_InAction +var _ = (Action)((ArrVal a) => //void +{ + a["b", 2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_IndexerAccess_Assign_InAction +var _ = (RefArrVal)((ref ArrVal a) => //void +{ + a["b", 2] = 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Assign_ParameterByRef_InAction +var _ = (ArrAndRefParam)(( + int[] a, + ref int b) => //void +{ + a[2] = b; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MultiArrayAccess_AddAssign_PlusOne +var _ = (Action)((int[,] a) => //void +{ + a[1, 2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_IndexerAccess_AddAssign_PlusOne_InAction +var _ = (Action)((Arr a) => //void +{ + a["b", 2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_NullablePlusNullable +var _ = (Action[]>)((Nullable[] a) => //void +{ + a[2] += (int?)33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ArrayAccess_AddAssign_PlusOne +var _ = (RefArr)((ref int[] a) => //void +{ + a[2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_NoIndexer_AddAssign_PlusOne +var _ = (RefArrValNoIndexer)((ref ArrValNoIndexer a) => //void +{ + a.SetItem( + "b", + 2, + a.GetItem( + "b", + 2) + 1); +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_PreIncrement +var _ = (Action)((int[] a) => //void +{ + ++a[2]; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_InAction +var _ = (Action)((int[] a) => //void +{ + a[2] += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_ReturnResultInFunction +var _ = (Func)((int[] a) => //int +{ + return a[2] += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MultiArrayAccess_Assign_InAction +var _ = (Action)((int[,] a) => //void +{ + a[1, 2] = 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_IndexerAccess_Assign_InAction +var _ = (Action)((Arr a) => //void +{ + a["b", 2] = 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Assign_InAction +var _ = (Action)((int[] a) => //void +{ + a[2] = 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_ToNewExpression +var _ = (Func)(() => //int +{ + return (new Box(42)).Field += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_StaticMember +var _ = (Action)(() => //void +{ + Box.StaticField += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_StaticProp +var _ = (Action)(() => //void +{ + Box.StaticProp += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign +var _ = (Action)((Box b) => //void +{ + b.Field += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PlusOneAssign +var _ = (Action)((Box b) => //void +{ + b.Field += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_NullablePlusNullable +var _ = (Action)((Box b) => //void +{ + b.NullableField += (int?)33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_NullablePlusNullable_Prop +var _ = (Action)((Box b) => //void +{ + b.NullableProp += (int?)33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PostIncrementAssign_Nullable_ReturningNullable +var _ = (RefValReturningNullable)((ref Val v) => //int? +{ + return v.NullableField++; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable +var _ = (RefValReturningNullable)((ref Val v) => //int? +{ + return ++v.NullableField; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable_Prop +var _ = (RefValReturningNullable)((ref Val v) => //int? +{ + return ++v.NullableProp; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable +var _ = (RefVal)((ref Val v) => //void +{ + ++v.NullableField; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_Prop +var _ = (RefVal)((ref Val v) => //void +{ + ++v.NullableProp; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PostIncrementAssign_Returning +var _ = (RefValReturning)((ref Val v) => //int +{ + return v.Field++; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Returning +var _ = (RefValReturning)((ref Val v) => //int +{ + return ++v.Field; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign +var _ = (RefVal)((ref Val v) => //void +{ + ++v.Field; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign +var _ = (Action)((Box b) => //void +{ + ++b.Field; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Returning +var _ = (Func)((Box b) => //int +{ + return ++b.Field; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PostIncrementAssign_Returning +var _ = (Func)((Box b) => //int +{ + return b.Field++; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreDecrementAssign_ToNewExpression +var _ = (Func)(() => //int +{ + return --(new Box(42)).Field; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Nullable +var _ = (Action)((Box b) => //void +{ + ++b.NullableField; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable +var _ = (Func)((Box b) => //int? +{ + return ++b.NullableField; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PostIncrementAssign_Nullable_ReturningNullable +var _ = (Func)((Box b) => //int? +{ + return b.NullableField++; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Add +var _ = (Action)((int[] a) => //void +{ + a[1] = a[1] + 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_PlusOne +var _ = (Action)((int[] a) => //void +{ + a[2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_IndexerAccess_Assign_InAction +var _ = (Action)((ArrVal a) => //void +{ + a["b", 2] = 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_IndexerAccess_AddAssign_PlusOne_InAction +var _ = (RefArrVal)((ref ArrVal a) => //void +{ + a["b", 2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_IndexerAccess_AddAssign_PlusOne_InAction +var _ = (Action)((ArrVal a) => //void +{ + a["b", 2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_IndexerAccess_Assign_InAction +var _ = (RefArrVal)((ref ArrVal a) => //void +{ + a["b", 2] = 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Assign_ParameterByRef_InAction +var _ = (ArrAndRefParam)(( + int[] a, + ref int b) => //void +{ + a[2] = b; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MultiArrayAccess_AddAssign_PlusOne +var _ = (Action)((int[,] a) => //void +{ + a[1, 2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_IndexerAccess_AddAssign_PlusOne_InAction +var _ = (Action)((Arr a) => //void +{ + a["b", 2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_NullablePlusNullable +var _ = (Action[]>)((Nullable[] a) => //void +{ + a[2] += (int?)33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ArrayAccess_AddAssign_PlusOne +var _ = (RefArr)((ref int[] a) => //void +{ + a[2] += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_NoIndexer_AddAssign_PlusOne +var _ = (RefArrValNoIndexer)((ref ArrValNoIndexer a) => //void +{ + a.SetItem( + "b", + 2, + a.GetItem( + "b", + 2) + 1); +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_PreIncrement +var _ = (Action)((int[] a) => //void +{ + ++a[2]; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_InAction +var _ = (Action)((int[] a) => //void +{ + a[2] += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_ReturnResultInFunction +var _ = (Func)((int[] a) => //int +{ + return a[2] += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MultiArrayAccess_Assign_InAction +var _ = (Action)((int[,] a) => //void +{ + a[1, 2] = 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_IndexerAccess_Assign_InAction +var _ = (Action)((Arr a) => //void +{ + a["b", 2] = 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Assign_InAction +var _ = (Action)((int[] a) => //void +{ + a[2] = 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_ToNewExpression +var _ = (Func)(() => //int +{ + return (new Box(42)).Field += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_StaticMember +var _ = (Action)(() => //void +{ + Box.StaticField += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_StaticProp +var _ = (Action)(() => //void +{ + Box.StaticProp += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign +var _ = (Action)((Box b) => //void +{ + b.Field += 33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PlusOneAssign +var _ = (Action)((Box b) => //void +{ + b.Field += 1; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_NullablePlusNullable +var _ = (Action)((Box b) => //void +{ + b.NullableField += (int?)33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_NullablePlusNullable_Prop +var _ = (Action)((Box b) => //void +{ + b.NullableProp += (int?)33; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PostIncrementAssign_Nullable_ReturningNullable +var _ = (RefValReturningNullable)((ref Val v) => //int? +{ + return v.NullableField++; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable +var _ = (RefValReturningNullable)((ref Val v) => //int? +{ + return ++v.NullableField; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable_Prop +var _ = (RefValReturningNullable)((ref Val v) => //int? +{ + return ++v.NullableProp; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable +var _ = (RefVal)((ref Val v) => //void +{ + ++v.NullableField; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_Prop +var _ = (RefVal)((ref Val v) => //void +{ + ++v.NullableProp; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PostIncrementAssign_Returning +var _ = (RefValReturning)((ref Val v) => //int +{ + return v.Field++; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Returning +var _ = (RefValReturning)((ref Val v) => //int +{ + return ++v.Field; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign +var _ = (RefVal)((ref Val v) => //void +{ + ++v.Field; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign +var _ = (Action)((Box b) => //void +{ + ++b.Field; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Returning +var _ = (Func)((Box b) => //int +{ + return ++b.Field; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PostIncrementAssign_Returning +var _ = (Func)((Box b) => //int +{ + return b.Field++; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreDecrementAssign_ToNewExpression +var _ = (Func)(() => //int +{ + return --(new Box(42)).Field; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Nullable +var _ = (Action)((Box b) => //void +{ + ++b.NullableField; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable +var _ = (Func)((Box b) => //int? +{ + return ++b.NullableField; +}); + +//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PostIncrementAssign_Nullable_ReturningNullable +var _ = (Func)((Box b) => //int? +{ + return b.NullableField++; +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1 +var _ = (Func)((int n) => //int +{ + Func sumFunc = null; + int m = default; + m = 45; + sumFunc = (Func)((int i) => //int + i + m); + m = 999; + return sumFunc.Invoke( + n); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_simplified +var _ = (Func)((int n) => //int +{ + Func sumFunc = null; + int m = default; + m = 45; + sumFunc = (Func)((int i) => //int + i + m); + m = 999; + return sumFunc.Invoke( + n); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_isolated_assign_int_to_the_array_of_objects_and_use_for_addition +var _ = (Func)((int n) => //int +{ + object[] a = null; + a = new object[]{(object)0}; + a[0] = (object)999; + return n + ((int)a[0]); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_closure_over_array_and_changing_its_element +var _ = (Func)((int n) => //int +{ + Func f = null; + object[] b = null; + f = (Func)((int i) => //int + i + ((int)b[0])); + b = new object[]{(object)999}; + return f.Invoke( + n); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_manual_closure +var _ = (Func)((int n) => //int +{ + Func f = null; + object[] b = null; + f = (Func)(( + object[] a, + int i) => //int + i + ((int)a[0])); + b = new object[]{(object)999}; + return f.Invoke( + b, + n); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test2_original_issue_case +var _ = (Func)((int n) => //int +{ + Func sumFunc = null; + sumFunc = (Func)((int i) => //int + (i == 0) ? 0 : + i + sumFunc.Invoke( + i - 1)); + return sumFunc.Invoke( + n); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1 +var _ = (Func)((int n) => //int +{ + Func sumFunc = null; + int m = default; + m = 45; + sumFunc = (Func)((int i) => //int + i + m); + m = 999; + return sumFunc.Invoke( + n); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_simplified +var _ = (Func)((int n) => //int +{ + Func sumFunc = null; + int m = default; + m = 45; + sumFunc = (Func)((int i) => //int + i + m); + m = 999; + return sumFunc.Invoke( + n); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_isolated_assign_int_to_the_array_of_objects_and_use_for_addition +var _ = (Func)((int n) => //int +{ + object[] a = null; + a = new object[]{(object)0}; + a[0] = (object)999; + return n + ((int)a[0]); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_closure_over_array_and_changing_its_element +var _ = (Func)((int n) => //int +{ + Func f = null; + object[] b = null; + f = (Func)((int i) => //int + i + ((int)b[0])); + b = new object[]{(object)999}; + return f.Invoke( + n); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_manual_closure +var _ = (Func)((int n) => //int +{ + Func f = null; + object[] b = null; + f = (Func)(( + object[] a, + int i) => //int + i + ((int)a[0])); + b = new object[]{(object)999}; + return f.Invoke( + b, + n); +}); + +//Issue353_NullReferenceException_when_calling_CompileFast_results.Test2_original_issue_case +var _ = (Func)((int n) => //int +{ + Func sumFunc = null; + sumFunc = (Func)((int i) => //int + (i == 0) ? 0 : + i + sumFunc.Invoke( + i - 1)); + return sumFunc.Invoke( + n); +}); + +//Issue357_Invalid_program_exception.Test1 +var _ = (Func)((ActionItem x) => //bool + x.AccountManagerId == ((long?)default(c__DisplayClass1_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.value)); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(() => //int[] + new int[]{}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(() => //int[] + new int[]{}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)((int p0) => //int[] + new int[]{p0}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)((int p0) => //int[] + new int[]{p0}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1) => //int[] + new int[]{ + p0, + p1}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1) => //int[] + new int[]{ + p0, + p1}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2) => //int[] + new int[]{ + p0, + p1, + p2}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2) => //int[] + new int[]{ + p0, + p1, + p2}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3) => //int[] + new int[]{ + p0, + p1, + p2, + p3}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3) => //int[] + new int[]{ + p0, + p1, + p2, + p3}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9, + int p10) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9, + p10}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9, + int p10) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9, + p10}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9, + int p10, + int p11) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9, + p10, + p11}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9, + int p10, + int p11) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9, + p10, + p11}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9, + int p10, + int p11, + int p12) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9, + p10, + p11, + p12}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9, + int p10, + int p11, + int p12) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9, + p10, + p11, + p12}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9, + int p10, + int p11, + int p12, + int p13) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9, + p10, + p11, + p12, + p13}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9, + int p10, + int p11, + int p12, + int p13) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9, + p10, + p11, + p12, + p13}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9, + int p10, + int p11, + int p12, + int p13, + int p14) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9, + p10, + p11, + p12, + p13, + p14}); + +//Issue363_ActionFunc16Generics.Can_Create_Func +var _ = (Func)(( + int p0, + int p1, + int p2, + int p3, + int p4, + int p5, + int p6, + int p7, + int p8, + int p9, + int p10, + int p11, + int p12, + int p13, + int p14) => //int[] + new int[]{ + p0, + p1, + p2, + p3, + p4, + p5, + p6, + p7, + p8, + p9, + p10, + p11, + p12, + p13, + p14}); + +//Issue365_Working_with_ref_return_values.Test_access_ref_returning_method_then_property +var _ = (Action)((ParamProcessor pp) => //void +{ + pp.GetParamValueByRef().Value = 7; +}); + +//Issue365_Working_with_ref_return_values.Test_access_ref_returning_method_assigned_var_then_property +var _ = (Action)((ParamProcessor pp) => //void +{ + ParamValue varByRef__discard_init_by_ref = default; ref var varByRef = ref varByRef__discard_init_by_ref; + varByRef = ref pp.GetParamValueByRef(); + varByRef.Value = 8; +}); + +//Issue366_FEC334_gives_incorrect_results_in_some_linq_operations.Test1 +var _ = (Func, double>)(( + double threshold, + List mylist) => //double + Enumerable.FirstOrDefault(Enumerable.Where( + mylist, + (Func)((double double_0) => //bool + double_0 > threshold)))); + +//Issue374_CompileFast_does_not_work_with_HasFlag.Test1 +var _ = (Func)((Bar x) => //bool + x.Foo.HasFlag(Foo.Green)); + +//Issue374_CompileFast_does_not_work_with_HasFlag.Test1 +var _ = (Func)((Bar x) => //bool + x.Foo.HasFlag(Foo.Green)); + +//Issue380_Comparisons_with_nullable_types.Test_left_decimal_Nullable_constant +var _ = (Func)((DecimalTest t) => //bool + ((Decimal?)20m) > t.D1); + +//Issue380_Comparisons_with_nullable_types.Test_left_decimal_constant +var _ = (Func)((DecimalTest t) => //bool + ((Decimal?)(Decimal)20) > t.D1); + +//Issue380_Comparisons_with_nullable_types.Test_right_decimal_constant +var _ = (Func)((DecimalTest t) => //bool + t.D1 < ((Decimal?)(Decimal)20)); + +//Issue380_Comparisons_with_nullable_types.Test_left_decimal_Nullable_constant +var _ = (Func)((DecimalTest t) => //bool + (Decimal?)20m > t.D1); + +//Issue380_Comparisons_with_nullable_types.Test_left_decimal_constant +var _ = (Func)((DecimalTest t) => //bool + ((Decimal?)(Decimal)20) > t.D1); + +//Issue380_Comparisons_with_nullable_types.Test_right_decimal_constant +var _ = (Func)((DecimalTest t) => //bool + t.D1 < ((Decimal?)(Decimal)20)); + +//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_null_spec +var _ = (Func)((Message_non_nullable x) => //bool + ((int?)x.UserType) != ((int?)((MessageSpec)null).type)); + +//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_UserType_nullable_type +var _ = (Func)((Message_non_nullable x) => //bool + ((int?)x.UserType) != ((int?)default(MessageSpec_NullableType)/*NOTE: Provide the non-default value for the Constant!*/.type)); + +//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_UserType_non_nullable_type +var _ = (Func)((Message_non_nullable x) => //bool + ((int?)x.UserType) != ((int?)default(MessageSpec)/*NOTE: Provide the non-default value for the Constant!*/.type)); + +//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_nullable_type +var _ = (Func)((Message x) => //bool + ((int?)x.UserType) != ((int?)default(MessageSpec_NullableType)/*NOTE: Provide the non-default value for the Constant!*/.type)); + +//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_type +var _ = (Func)((Message x) => //bool + ((int?)x.UserType) != ((int?)default(MessageSpec)/*NOTE: Provide the non-default value for the Constant!*/.type)); + +//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_null_spec +var _ = (Func)((Message_non_nullable x) => //bool + ((int?)x.UserType) != ((int?)((MessageSpec)null).type)); + +//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_UserType_nullable_type +var _ = (Func)((Message_non_nullable x) => //bool + ((int?)x.UserType) != ((int?)default(MessageSpec_NullableType)/*NOTE: Provide the non-default value for the Constant!*/.type)); + +//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_UserType_non_nullable_type +var _ = (Func)((Message_non_nullable x) => //bool + ((int?)x.UserType) != ((int?)default(MessageSpec)/*NOTE: Provide the non-default value for the Constant!*/.type)); + +//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_nullable_type +var _ = (Func)((Message x) => //bool + ((int?)x.UserType) != ((int?)default(MessageSpec_NullableType)/*NOTE: Provide the non-default value for the Constant!*/.type)); + +//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_type +var _ = (Func)((Message x) => //bool + ((int?)x.UserType) != ((int?)default(MessageSpec)/*NOTE: Provide the non-default value for the Constant!*/.type)); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((AuthResultDto authResultDto_0) => //Token +{ + MapContextScope scope = null; + if (authResultDto_0 == (AuthResultDto)null) + { + return (Token)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + Token result = null; + references = scope.Context.References; + key = new ReferenceTuple( + authResultDto_0, + typeof(Token)); + if (references.TryGetValue( + key, + out cache)) + { + return (Token)cache; + } + result = new Token(); + references[key] = (object)result; + result.RefreshTokenExpirationDate = ((Func)((DateTime? dateTime__1) => //DateTime + (dateTime__1 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__1)) + .Invoke( + (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : + (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_Token_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)(( + AuthResultDto authResultDto_0, + Token token_1) => //Token +{ + MapContextScope scope = null; + if (authResultDto_0 == (AuthResultDto)null) + { + return (Token)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + Token result = null; + references = scope.Context.References; + key = new ReferenceTuple( + authResultDto_0, + typeof(Token)); + if (references.TryGetValue( + key, + out cache)) + { + return (Token)cache; + } + result = token_1 ?? new Token(); + references[key] = (object)result; + result.RefreshTokenExpirationDate = ((Func)(( + DateTime? dateTime__2, + DateTime dateTime_3) => //DateTime + (dateTime__2 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__2)) + .Invoke( + (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : + (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime, + result.RefreshTokenExpirationDate); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_Token_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((ExportInfoModel exportInfoModel_0) => //ExportInfoDto +{ + MapContextScope scope = null; + if (exportInfoModel_0 == (ExportInfoModel)null) + { + return (ExportInfoDto)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + ExportInfoDto result = null; + references = scope.Context.References; + key = new ReferenceTuple( + exportInfoModel_0, + typeof(ExportInfoDto)); + if (references.TryGetValue( + key, + out cache)) + { + return (ExportInfoDto)cache; + } + result = new ExportInfoDto(TypeAdapter[], long[]>.Map.Invoke(exportInfoModel_0.Locations)); + references[key] = (object)result; + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_ExportInfoDto_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)(( + ExportInfoModel exportInfoModel_0, + ExportInfoDto exportInfoDto_1) => //ExportInfoDto +{ + MapContextScope scope = null; + if (exportInfoModel_0 == (ExportInfoModel)null) + { + return (ExportInfoDto)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + ExportInfoDto result = null; + references = scope.Context.References; + key = new ReferenceTuple( + exportInfoModel_0, + typeof(ExportInfoDto)); + if (references.TryGetValue( + key, + out cache)) + { + return (ExportInfoDto)cache; + } + result = new ExportInfoDto(TypeAdapter[], long[]>.Map.Invoke(exportInfoModel_0.Locations)); + references[key] = (object)result; + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_ExportInfoDto_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((TestClass testClass_0) => //TestEnum + (testClass_0 == (TestClass)null) ? (TestEnum)0 : + new TestEnum() + { + value__ = ((testClass_0.Type == 1) ? TestEnum.A : + (testClass_0.Type == 2) ? TestEnum.B : + (testClass_0.Type == 3) ? TestEnum.C : TestEnum.D).value__ + }); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)(( + TestClass testClass_0, + TestEnum testEnum_1) => //TestEnum +{ + TestEnum result = default; + if (testClass_0 == (TestClass)null) + { + return (TestEnum)0; + } + result = testEnum_1; + result.value__ = ((testClass_0.Type == 1) ? TestEnum.A : + (testClass_0.Type == 2) ? TestEnum.B : + (testClass_0.Type == 3) ? TestEnum.C : TestEnum.D).value__; + return result; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((ResultAgent resultAgent_0) => //AgentStatusDto +{ + MapContextScope scope = null; + if (resultAgent_0 == (ResultAgent)null) + { + return (AgentStatusDto)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + AgentStatusDto result = null; + references = scope.Context.References; + key = new ReferenceTuple( + resultAgent_0, + typeof(AgentStatusDto)); + if (references.TryGetValue( + key, + out cache)) + { + return (AgentStatusDto)cache; + } + result = new AgentStatusDto(); + references[key] = (object)result; + result.ErrorCode = ((Func)((int? int__1) => //int + (int__1 == (int?)null) ? 0 : (int)int__1)) + .Invoke( + (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : + (int?)resultAgent_0.Common.Code); + result.CompleteTaskType = ((Func)((int? int__2) => //int + (int__2 == (int?)null) ? 0 : (int)int__2)) + .Invoke( + (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : + (int?)resultAgent_0.Common.TaskType); + default(Action)/*NOTE: Provide the non-default value for the Constant!*/.Invoke( + resultAgent_0, + result); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_AgentStatusDto_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)(( + ResultAgent resultAgent_0, + AgentStatusDto agentStatusDto_1) => //AgentStatusDto +{ + MapContextScope scope = null; + if (resultAgent_0 == (ResultAgent)null) + { + return (AgentStatusDto)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + AgentStatusDto result = null; + references = scope.Context.References; + key = new ReferenceTuple( + resultAgent_0, + typeof(AgentStatusDto)); + if (references.TryGetValue( + key, + out cache)) + { + return (AgentStatusDto)cache; + } + result = agentStatusDto_1 ?? new AgentStatusDto(); + references[key] = (object)result; + result.ErrorCode = ((Func)(( + int? int__2, + int int_3) => //int + (int__2 == (int?)null) ? 0 : (int)int__2)) + .Invoke( + (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : + (int?)resultAgent_0.Common.Code, + result.ErrorCode); + result.CompleteTaskType = ((Func)(( + int? int__4, + int int_5) => //int + (int__4 == (int?)null) ? 0 : (int)int__4)) + .Invoke( + (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : + (int?)resultAgent_0.Common.TaskType, + result.CompleteTaskType); + default(Action)/*NOTE: Provide the non-default value for the Constant!*/.Invoke( + resultAgent_0, + result); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_AgentStatusDto_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((object object_0) => //TestEnum +{ + TestClass testClass_1 = null; + testClass_1 = (TestClass)object_0; + return (testClass_1 == (TestClass)null) ? (TestEnum)0 : + new TestEnum() + { + value__ = ((testClass_1.Type == 1) ? TestEnum.A : + (testClass_1.Type == 2) ? TestEnum.B : + (testClass_1.Type == 3) ? TestEnum.C : TestEnum.D).value__ + }; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((object object_0) => //Token +{ + AuthResultDto authResultDto_1 = null; + authResultDto_1 = (AuthResultDto)object_0; + MapContextScope scope = null; + if (authResultDto_1 == (AuthResultDto)null) + { + return (Token)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + Token result = null; + references = scope.Context.References; + key = new ReferenceTuple( + authResultDto_1, + typeof(Token)); + if (references.TryGetValue( + key, + out cache)) + { + return (Token)cache; + } + result = new Token(); + references[key] = (object)result; + result.RefreshTokenExpirationDate = ((Func)((DateTime? dateTime__2) => //DateTime + (dateTime__2 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__2)) + .Invoke( + (authResultDto_1.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : + (DateTime?)authResultDto_1.RefreshToken.ExpirationDate.LocalDateTime); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_Token_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((object object_0) => //ExportInfoDto +{ + ExportInfoModel exportInfoModel_1 = null; + exportInfoModel_1 = (ExportInfoModel)object_0; + MapContextScope scope = null; + if (exportInfoModel_1 == (ExportInfoModel)null) + { + return (ExportInfoDto)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + ExportInfoDto result = null; + references = scope.Context.References; + key = new ReferenceTuple( + exportInfoModel_1, + typeof(ExportInfoDto)); + if (references.TryGetValue( + key, + out cache)) + { + return (ExportInfoDto)cache; + } + result = new ExportInfoDto(TypeAdapter[], long[]>.Map.Invoke(exportInfoModel_1.Locations)); + references[key] = (object)result; + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_ExportInfoDto_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func[], long[]>)((Nullable[] nullable_long__a_0) => //long[] +{ + MapContextScope scope = null; + if (nullable_long__a_0 == (Nullable[])null) + { + return (long[])null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + long[] result = null; + references = scope.Context.References; + key = new ReferenceTuple( + nullable_long__a_0, + typeof(long[])); + if (references.TryGetValue( + key, + out cache)) + { + return (long[])cache; + } + result = new long[nullable_long__a_0.Length]; + references[key] = (object)result; + int v = default; + v = 0; + int i = default; + int len = default; + i = 0; + len = nullable_long__a_0.Length; + while (true) + { + if (i < len) + { + long? item = null; + item = nullable_long__a_0[i]; + result[v++] = (item == (long?)null) ? (long)0 : (long)item; + i++; + } + else + { + goto LoopBreak; + } + } + LoopBreak:; + return result; + } + finally + { + scope.Dispose(); + } + long_a_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((object object_0) => //AgentStatusDto +{ + ResultAgent resultAgent_1 = null; + resultAgent_1 = (ResultAgent)object_0; + MapContextScope scope = null; + if (resultAgent_1 == (ResultAgent)null) + { + return (AgentStatusDto)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + AgentStatusDto result = null; + references = scope.Context.References; + key = new ReferenceTuple( + resultAgent_1, + typeof(AgentStatusDto)); + if (references.TryGetValue( + key, + out cache)) + { + return (AgentStatusDto)cache; + } + result = new AgentStatusDto(); + references[key] = (object)result; + result.ErrorCode = ((Func)((int? int__2) => //int + (int__2 == (int?)null) ? 0 : (int)int__2)) + .Invoke( + (resultAgent_1.Common == (ResponseAgent)null) ? (int?)null : + (int?)resultAgent_1.Common.Code); + result.CompleteTaskType = ((Func)((int? int__3) => //int + (int__3 == (int?)null) ? 0 : (int)int__3)) + .Invoke( + (resultAgent_1.Common == (ResponseAgent)null) ? (int?)null : + (int?)resultAgent_1.Common.TaskType); + default(Action)/*NOTE: Provide the non-default value for the Constant!*/.Invoke( + resultAgent_1, + result); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_AgentStatusDto_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((AuthResultDto authResultDto_0) => //Token +{ + MapContextScope scope = null; + if (authResultDto_0 == (AuthResultDto)null) + { + return (Token)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + Token result = null; + references = scope.Context.References; + key = new ReferenceTuple( + authResultDto_0, + typeof(Token)); + if (references.TryGetValue( + key, + out cache)) + { + return (Token)cache; + } + result = new Token(); + references[key] = (object)result; + result.RefreshTokenExpirationDate = ((Func)((DateTime? dateTime__1) => //DateTime + (dateTime__1 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__1)) + .Invoke( + (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : + (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_Token_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)(( + AuthResultDto authResultDto_0, + Token token_1) => //Token +{ + MapContextScope scope = null; + if (authResultDto_0 == (AuthResultDto)null) + { + return (Token)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + Token result = null; + references = scope.Context.References; + key = new ReferenceTuple( + authResultDto_0, + typeof(Token)); + if (references.TryGetValue( + key, + out cache)) + { + return (Token)cache; + } + result = token_1 ?? new Token(); + references[key] = (object)result; + result.RefreshTokenExpirationDate = ((Func)(( + DateTime? dateTime__2, + DateTime dateTime_3) => //DateTime + (dateTime__2 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__2)) + .Invoke( + (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : + (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime, + result.RefreshTokenExpirationDate); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_Token_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((ExportInfoModel exportInfoModel_0) => //ExportInfoDto +{ + MapContextScope scope = null; + if (exportInfoModel_0 == (ExportInfoModel)null) + { + return (ExportInfoDto)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + ExportInfoDto result = null; + references = scope.Context.References; + key = new ReferenceTuple( + exportInfoModel_0, + typeof(ExportInfoDto)); + if (references.TryGetValue( + key, + out cache)) + { + return (ExportInfoDto)cache; + } + result = new ExportInfoDto(TypeAdapter[], long[]>.Map.Invoke(exportInfoModel_0.Locations)); + references[key] = (object)result; + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_ExportInfoDto_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)(( + ExportInfoModel exportInfoModel_0, + ExportInfoDto exportInfoDto_1) => //ExportInfoDto +{ + MapContextScope scope = null; + if (exportInfoModel_0 == (ExportInfoModel)null) + { + return (ExportInfoDto)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + ExportInfoDto result = null; + references = scope.Context.References; + key = new ReferenceTuple( + exportInfoModel_0, + typeof(ExportInfoDto)); + if (references.TryGetValue( + key, + out cache)) + { + return (ExportInfoDto)cache; + } + result = new ExportInfoDto(TypeAdapter[], long[]>.Map.Invoke(exportInfoModel_0.Locations)); + references[key] = (object)result; + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_ExportInfoDto_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((TestClass testClass_0) => //TestEnum + (testClass_0 == (TestClass)null) ? (TestEnum)0 : + new TestEnum() + { + value__ = ((testClass_0.Type == 1) ? TestEnum.A : + (testClass_0.Type == 2) ? TestEnum.B : + (testClass_0.Type == 3) ? TestEnum.C : TestEnum.D).value__ + }); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)(( + TestClass testClass_0, + TestEnum testEnum_1) => //TestEnum +{ + TestEnum result = default; + if (testClass_0 == (TestClass)null) + { + return (TestEnum)0; + } + result = testEnum_1; + result.value__ = ((testClass_0.Type == 1) ? TestEnum.A : + (testClass_0.Type == 2) ? TestEnum.B : + (testClass_0.Type == 3) ? TestEnum.C : TestEnum.D).value__; + return result; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)((ResultAgent resultAgent_0) => //AgentStatusDto +{ + MapContextScope scope = null; + if (resultAgent_0 == (ResultAgent)null) + { + return (AgentStatusDto)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + AgentStatusDto result = null; + references = scope.Context.References; + key = new ReferenceTuple( + resultAgent_0, + typeof(AgentStatusDto)); + if (references.TryGetValue( + key, + out cache)) + { + return (AgentStatusDto)cache; + } + result = new AgentStatusDto(); + references[key] = (object)result; + result.ErrorCode = ((Func)((int? int__1) => //int + (int__1 == (int?)null) ? 0 : (int)int__1)) + .Invoke( + (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : + (int?)resultAgent_0.Common.Code); + result.CompleteTaskType = ((Func)((int? int__2) => //int + (int__2 == (int?)null) ? 0 : (int)int__2)) + .Invoke( + (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : + (int?)resultAgent_0.Common.TaskType); + default(Action)/*NOTE: Provide the non-default value for the Constant!*/.Invoke( + resultAgent_0, + result); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_AgentStatusDto_0:; +}); + +//Issue390_405_406_Mapster_tests.Run +var _ = (Func)(( + ResultAgent resultAgent_0, + AgentStatusDto agentStatusDto_1) => //AgentStatusDto +{ + MapContextScope scope = null; + if (resultAgent_0 == (ResultAgent)null) + { + return (AgentStatusDto)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + AgentStatusDto result = null; + references = scope.Context.References; + key = new ReferenceTuple( + resultAgent_0, + typeof(AgentStatusDto)); + if (references.TryGetValue( + key, + out cache)) + { + return (AgentStatusDto)cache; + } + result = agentStatusDto_1 ?? new AgentStatusDto(); + references[key] = (object)result; + result.ErrorCode = ((Func)(( + int? int__2, + int int_3) => //int + (int__2 == (int?)null) ? 0 : (int)int__2)) + .Invoke( + (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : + (int?)resultAgent_0.Common.Code, + result.ErrorCode); + result.CompleteTaskType = ((Func)(( + int? int__4, + int int_5) => //int + (int__4 == (int?)null) ? 0 : (int)int__4)) + .Invoke( + (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : + (int?)resultAgent_0.Common.TaskType, + result.CompleteTaskType); + default(Action)/*NOTE: Provide the non-default value for the Constant!*/.Invoke( + resultAgent_0, + result); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_AgentStatusDto_0:; +}); + +//Issue390_405_406_Mapster_tests.Issue390_Test_extracted_small_mapping_code +var _ = (Func)((AuthResultDto authResultDto_0) => //Token +{ + MapContextScope scope = null; + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + Token result = null; + references = scope.Context.References; + key = new ReferenceTuple( + authResultDto_0, + typeof(Token)); + result = new Token(); + references[key] = (object)result; + result.RefreshTokenExpirationDate = ((Func)((DateTime? dateTime__1) => //DateTime + (dateTime__1 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__1)) + .Invoke( + (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : + (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_Token_0:; +}); + +//Issue390_405_406_Mapster_tests.Issue390_Test_extracted_small_just_mapping_code_No_issue +var _ = (Func)((AuthResultDto authResultDto_0) => //DateTime + ((Func)((DateTime? dateTime__1) => //DateTime + (dateTime__1 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__1)) + .Invoke( + (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : + (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime)); + +//Issue390_405_406_Mapster_tests.Issue390_Test_extracted_mapping_code +var _ = (Func)((AuthResultDto authResultDto_0) => //Token +{ + MapContextScope scope = null; + if (authResultDto_0 == (AuthResultDto)null) + { + return (Token)null; + } + scope = new MapContextScope(); + try + { + object cache = null; + Dictionary references = null; + ReferenceTuple key = default; + Token result = null; + references = scope.Context.References; + key = new ReferenceTuple( + authResultDto_0, + typeof(Token)); + if (references.TryGetValue( + key, + out cache)) + { + return (Token)cache; + } + result = new Token(); + references[key] = (object)result; + result.RefreshTokenExpirationDate = ((Func)((DateTime? dateTime__1) => //DateTime + (dateTime__1 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__1)) + .Invoke( + (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : + (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime); + return result; + } + finally + { + scope.Dispose(); + } + issue390_405_406_Mapster_tests_Token_0:; +}); + +//Issue400_Fix_the_direct_assignment_of_Try_to_Member.Test_original +T __f(System.Func f) => f(); +var _ = (Func)(( + ModelSubObject source, + DtoSubObject destination, + ResolutionContext context) => //DtoSubObject + (source == null) ? + (destination == null) ? (DtoSubObject)null : destination : + __f(() => { + DtoSubObject typeMapDestination = null; + typeMapDestination = destination ?? new DtoSubObject(); + try + { + typeMapDestination.SubString = source.SubString; + } + catch (Exception ex) + { + throw TypeMapPlanBuilder.MemberMappingError( + ex, + null); + } + try + { + typeMapDestination.BaseString = + __f(() => { + try + { + return source.DifferentBaseString; + } + catch (NullReferenceException) + { + return (string)null; + } + catch (ArgumentNullException) + { + return (string)null; + } + }) ?? "12345"; + } + catch (Exception ex) + { + throw TypeMapPlanBuilder.MemberMappingError( + ex, + null); + } + return typeMapDestination; + })); + +//Issue400_Fix_the_direct_assignment_of_Try_to_Member.Test_original +T __f(System.Func f) => f(); +var _ = (Func)(( + ModelSubObject source, + DtoSubObject destination, + ResolutionContext context) => //DtoSubObject + (source == null) ? + (destination == null) ? (DtoSubObject)null : destination : + __f(() => { + DtoSubObject typeMapDestination = null; + typeMapDestination = destination ?? new DtoSubObject(); + try + { + typeMapDestination.SubString = source.SubString; + } + catch (Exception ex) + { + throw TypeMapPlanBuilder.MemberMappingError( + ex, + null); + } + try + { + typeMapDestination.BaseString = + __f(() => { + try + { + return source.DifferentBaseString; + } + catch (NullReferenceException) + { + return (string)null; + } + catch (ArgumentNullException) + { + return (string)null; + } + }) ?? "12345"; + } + catch (Exception ex) + { + throw TypeMapPlanBuilder.MemberMappingError( + ex, + null); + } + return typeMapDestination; + })); + +//Issue404_An_expression_with_a_single_parameter_concatenated_to_a_string_causes_Exception.Test1 +var _ = (Func)((double double_0) => //string + string.Concat( + "The value is ", + (((double?)double_0) == null) ? "" : + double_0.ToString())); + +//Issue404_An_expression_with_a_single_parameter_concatenated_to_a_string_causes_Exception.Test1 +var _ = (Func)((double double_0) => //string + string.Concat( + "The value is ", + (((double?)double_0) == null) ? "" : + double_0.ToString())); + +//Issue408_Dictionary_mapping_failing_when_the_InvocationExpression_inlining_is_involved.AutoMapper_UnitTests_When_mapping_to_a_generic_dictionary_with_mapped_value_pairs +T __f(System.Func f) => f(); +var _ = (Func)(( + Source source, + Destination destination, + ResolutionContext context) => //Destination + (source == null) ? + (destination == null) ? (Destination)null : destination : + __f(() => { + Destination typeMapDestination = null; + typeMapDestination = destination ?? new Destination(); + try + { + Dictionary resolvedValue = null; + Dictionary mappedValue = null; + resolvedValue = source.Values; + mappedValue = (resolvedValue == null) ? + new Dictionary() : + __f(() => { + Dictionary collectionDestination = null; + Dictionary passedDestination = null; + passedDestination = (destination == null) ? (Dictionary)null : + typeMapDestination.Values; + collectionDestination = passedDestination ?? new Dictionary(); + collectionDestination.Clear(); + Enumerator enumerator = default; + KeyValuePair item = default; + enumerator = resolvedValue.GetEnumerator(); + try + { + while (true) + { + if (enumerator.MoveNext()) + { + item = enumerator.Current; + collectionDestination.Add(new KeyValuePair( + item.Key, + ((Func)(( + SourceValue source_1, + DestinationValue destination_1, + ResolutionContext context) => //DestinationValue + (source_1 == null) ? + (destination_1 == null) ? (DestinationValue)null : destination_1 : + __f(() => { + DestinationValue typeMapDestination_1 = null; + typeMapDestination_1 = destination_1 ?? new DestinationValue(); + try + { + typeMapDestination_1.Value = source_1.Value; + } + catch (Exception ex) + { + throw TypeMapPlanBuilder.MemberMappingError( + ex, + default(PropertyMap)/*NOTE: Provide the non-default value for the Constant!*/); + } + return typeMapDestination_1; + }))) + .Invoke( + item.Value, + (DestinationValue)null, + context))); + } + else + { + goto LoopBreak; + } + } + LoopBreak:; + } + finally + { + enumerator.Dispose(); + } + return collectionDestination; + }); + return typeMapDestination.Values = mappedValue; + } + catch (Exception ex) + { + throw TypeMapPlanBuilder.MemberMappingError( + ex, + default(PropertyMap)/*NOTE: Provide the non-default value for the Constant!*/); + } + return typeMapDestination; + })); + +//Issue408_Dictionary_mapping_failing_when_the_InvocationExpression_inlining_is_involved.AutoMapper_UnitTests_When_mapping_to_a_generic_dictionary_with_mapped_value_pairs +T __f(System.Func f) => f(); +var _ = (Func)(( + Source source, + Destination destination, + ResolutionContext context) => //Destination + (source == null) ? + (destination == null) ? (Destination)null : destination : + __f(() => { + Destination typeMapDestination = null; + typeMapDestination = destination ?? new Destination(); + try + { + Dictionary resolvedValue = null; + Dictionary mappedValue = null; + resolvedValue = source.Values; + mappedValue = (resolvedValue == null) ? + new Dictionary() : + __f(() => { + Dictionary collectionDestination = null; + Dictionary passedDestination = null; + passedDestination = (destination == null) ? (Dictionary)null : + typeMapDestination.Values; + collectionDestination = passedDestination ?? new Dictionary(); + collectionDestination.Clear(); + Enumerator enumerator = default; + KeyValuePair item = default; + enumerator = resolvedValue.GetEnumerator(); + try + { + while (true) + { + if (enumerator.MoveNext()) + { + item = enumerator.Current; + collectionDestination.Add(new KeyValuePair( + item.Key, + ((Func)(( + SourceValue source_1, + DestinationValue destination_1, + ResolutionContext context) => //DestinationValue + (source_1 == null) ? + (destination_1 == null) ? (DestinationValue)null : destination_1 : + __f(() => { + DestinationValue typeMapDestination_1 = null; + typeMapDestination_1 = destination_1 ?? new DestinationValue(); + try + { + typeMapDestination_1.Value = source_1.Value; + } + catch (Exception ex) + { + throw TypeMapPlanBuilder.MemberMappingError( + ex, + default(PropertyMap)/*NOTE: Provide the non-default value for the Constant!*/); + } + return typeMapDestination_1; + }))) + .Invoke( + item.Value, + (DestinationValue)null, + context))); + } + else + { + goto LoopBreak; + } + } + LoopBreak:; + } + finally + { + enumerator.Dispose(); + } + return collectionDestination; + }); + return typeMapDestination.Values = mappedValue; + } + catch (Exception ex) + { + throw TypeMapPlanBuilder.MemberMappingError( + ex, + default(PropertyMap)/*NOTE: Provide the non-default value for the Constant!*/); + } + return typeMapDestination; + })); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue413_ParameterStructIndexer +var _ = (MyDelegateStruct)((MyStruct myStruct_0) => //int + myStruct_0[1]); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue413_VariableStructIndexer +var _ = (MyDelegateNoArgs)(() => //int +{ + MyStruct myStruct_0 = default; + myStruct_0 = new MyStruct(); + return myStruct_0[1]; +}); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue414_ReturnRefParameter +var _ = (MyDelegate)((ref int int_0) => //int + int_0); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue414_PassByRefParameter +var _ = (MyDelegate)((ref int int_0) => //int +{ + Issue414_Incorrect_il_when_passing_by_ref_value.IncRef(ref int_0); + return int_0; +}); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue413_ParameterStructIndexer +var _ = (MyDelegateStruct)((MyStruct myStruct_0) => //int + myStruct_0[1]); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue413_VariableStructIndexer +var _ = (MyDelegateNoArgs)(() => //int +{ + MyStruct myStruct_0 = default; + myStruct_0 = new MyStruct(); + return myStruct_0[1]; +}); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue414_ReturnRefParameter +var _ = (MyDelegate)((ref int int_0) => //int + int_0); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue414_PassByRefParameter +var _ = (MyDelegate)((ref int int_0) => //int +{ + Issue414_Incorrect_il_when_passing_by_ref_value.IncRef(ref int_0); + return int_0; +}); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue414_PassByRefVariable +var _ = (MyDelegateNoPars)(() => //int +{ + int __discard_init_by_ref = default; ref var int_0 = ref __discard_init_by_ref; + int_0 = 17; + Issue414_Incorrect_il_when_passing_by_ref_value.IncRef(ref int_0); + return int_0; +}); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue415_ReturnRefParameterByRef +var _ = (MyDelegateByRef)((ref int int_0) => //Int32 + ref int_0); + +//Issue414_Incorrect_il_when_passing_by_ref_value.Issue415_ReturnRefParameterByRef_ReturnRefCall +var _ = (MyDelegateByRef)((ref int int_0) => //Int32 + ref Issue414_Incorrect_il_when_passing_by_ref_value.ReturnRef(ref int_0)); + +//Issue418_Wrong_output_when_comparing_NaN_value.Original_case +var _ = (Func)((double double_0) => //bool + double_0 >= 0); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_int +var _ = (Func)((int int_0) => //bool + int_0 >= 0); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_Uint +var _ = (Func)((uint uint_0) => //bool + uint_0 >= (uint)0); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_less_then +var _ = (Func)((double double_0) => //bool + double_0 < 0); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_one +var _ = (Func)((double double_0) => //bool + double_0 >= 1); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_Minus_one +var _ = (Func)((double double_0) => //bool + double_0 >= -1); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_lte_instead_of_gte +var _ = (Func)((double double_0) => //bool + double_0 <= 0); + +//Issue418_Wrong_output_when_comparing_NaN_value.Original_case +var _ = (Func)((double double_0) => //bool + double_0 >= 0); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_int +var _ = (Func)((int int_0) => //bool + int_0 >= 0); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_Uint +var _ = (Func)((uint uint_0) => //bool + uint_0 >= (uint)0); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_less_then +var _ = (Func)((double double_0) => //bool + double_0 < 0); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_one +var _ = (Func)((double double_0) => //bool + double_0 >= 1); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_Minus_one +var _ = (Func)((double double_0) => //bool + double_0 >= -1); + +//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_lte_instead_of_gte +var _ = (Func)((double double_0) => //bool + double_0 <= 0); + +//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Original_Case_1 +var _ = (Func)((Obj d) => //bool + ((d == null) ? (double?)null : + d.X) > (((double?)3) * ((((d == null) ? (Nested)null : + d.Nested) == null) ? (double?)null : + d.Nested.Y))); + +//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_Simplified_less +var _ = (Func)((Obj d) => //bool + ((d == null) ? (double?)null : + d.X) > (((double?)3) * ((d.Nested == null) ? (double?)null : + d.Nested.Y))); + +//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_simplified +var _ = (Func)((Obj d) => //bool + ((d == null) ? (double?)null : + d.X) > ((double?)3)); + +//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_Simplified_less_reversed_mul_args +var _ = (Func)((Obj d) => //bool + ((d == null) ? (double?)null : + d.X) > (((d.Nested == null) ? (double?)null : + d.Nested.Y) * ((double?)3))); + +//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Original_Case_2 +var _ = (RefFunc)((in Obj p) => //bool + ((p == null) ? (double?)null : + p.X) > (((double?)2) * ((((p == null) ? (Nested)null : + p.Nested) == null) ? (double?)null : + ((p == null) ? (Nested)null : + p.Nested).Y))); + +//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Original_Case_1 +var _ = (Func)((Obj d) => //bool + ((d == null) ? (double?)null : + d.X) > (((double?)3) * ((((d == null) ? (Nested)null : + d.Nested) == null) ? (double?)null : + d.Nested.Y))); + +//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_Simplified_less +var _ = (Func)((Obj d) => //bool + ((d == null) ? (double?)null : + d.X) > (((double?)3) * ((d.Nested == null) ? (double?)null : + d.Nested.Y))); + +//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_simplified +var _ = (Func)((Obj d) => //bool + ((d == null) ? (double?)null : + d.X) > ((double?)3)); + +//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_Simplified_less_reversed_mul_args +var _ = (Func)((Obj d) => //bool + ((d == null) ? (double?)null : + d.X) > (((d.Nested == null) ? (double?)null : + d.Nested.Y) * ((double?)3))); + +//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Original_Case_2 +var _ = (RefFunc)((in Obj p) => //bool + ((p == null) ? (double?)null : + p.X) > (((double?)2) * ((((p == null) ? (Nested)null : + p.Nested) == null) ? (double?)null : + ((p == null) ? (Nested)null : + p.Nested).Y))); + +//Issue420_Nullable_DateTime_comparison_differs_from_Expression_Compile.Original_case +var _ = (Func)((HasDateTime HasDateTime) => //bool + HasDateTime.T == (DateTime?)DateTime.Parse("4/13/2026 7:15:20 PM")); + +//Issue420_Nullable_DateTime_comparison_differs_from_Expression_Compile.Original_case +var _ = (Func)((HasDateTime HasDateTime) => //bool + HasDateTime.T == (DateTime?)DateTime.Parse("4/13/2026 7:15:20 PM")); + +//Issue421_Date_difference_is_giving_wrong_negative_value.Original_case_2 +var _ = (Func)(() => //double + (DateTime.Now.Date - default(c__DisplayClass3_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.contract.StartDate.Date).TotalDays); + +//Issue421_Date_difference_is_giving_wrong_negative_value.Original_case_1 +var _ = (Func)(() => //double + (DateTime.Now - default(c__DisplayClass2_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.contract.StartDate).TotalDays); + +//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case_but_comparing_with_non_null_left_operand +T __f(System.Func f) => f(); +var _ = (Func, bool>)((Tuple tuple_object__0) => //bool + left == + __f(() => { + try + { + return tuple_object__0.Item1; + } + catch (NullReferenceException) + { + return null; + } + })); + +//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case +T __f(System.Func f) => f(); +var _ = (Func, bool>)((Tuple tuple_object__0) => //bool + null == + __f(() => { + try + { + return tuple_object__0.Item1; + } + catch (NullReferenceException) + { + return null; + } + })); + +//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case_but_comparing_with_nullable_left_operand +T __f(System.Func f) => f(); +var _ = (Func, bool>)((Tuple tuple_DateTime___0) => //bool + (DateTime?)DateTime.Parse("12/31/9999 11:59:59 PM") == + __f(() => { + try + { + return tuple_DateTime___0.Item1; + } + catch (NullReferenceException) + { + return (DateTime?)DateTime.Parse("12/31/9999 11:59:59 PM"); + } + })); + +//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Change_comparison_operators_order_as_expected +T __f(System.Func f) => f(); +var _ = (Func, bool>)((Tuple tuple_object__0) => //bool + __f(() => { + try + { + return tuple_object__0.Item1; + } + catch (NullReferenceException) + { + return null; + } + }) == null); + +//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case_but_comparing_with_non_null_left_operand +T __f(System.Func f) => f(); +var _ = (Func, bool>)((Tuple tuple_object__0) => //bool + left == + __f(() => { + try + { + return tuple_object__0.Item1; + } + catch (NullReferenceException) + { + return null; + } + })); + +//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case +T __f(System.Func f) => f(); +var _ = (Func, bool>)((Tuple tuple_object__0) => //bool + null == + __f(() => { + try + { + return tuple_object__0.Item1; + } + catch (NullReferenceException) + { + return null; + } + })); + +//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case_but_comparing_with_nullable_left_operand +T __f(System.Func f) => f(); +var _ = (Func, bool>)((Tuple tuple_DateTime___0) => //bool + (DateTime?)DateTime.Parse("12/31/9999 11:59:59 PM") == + __f(() => { + try + { + return tuple_DateTime___0.Item1; + } + catch (NullReferenceException) + { + return (DateTime?)DateTime.Parse("12/31/9999 11:59:59 PM"); + } + })); + +//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Change_comparison_operators_order_as_expected +T __f(System.Func f) => f(); +var _ = (Func, bool>)((Tuple tuple_object__0) => //bool + __f(() => { + try + { + return tuple_object__0.Item1; + } + catch (NullReferenceException) + { + return null; + } + }) == null); + +//Issue423_Converting_a_uint_to_a_float_gives_the_wrong_result.Original_case +var _ = (Func)((uint p) => //float + (float)p); + +//Issue423_Converting_a_uint_to_a_float_gives_the_wrong_result.Original_case +var _ = (Func)((uint p) => //float + (float)p); + +//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Two_ref_value_params_case +var _ = (Func)(() => //int + Numbers.AddTwoTwo( + ref Numbers.GetInt(), + ref Numbers.GetInt())); + +//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Original_case +var _ = (Func)(() => //int + Numbers.AddTwo(ref Numbers.GetInt())); + +//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Class_ref_param_case +var _ = (Func)(() => //string + Numbers.AckMessage(ref Numbers.GetMessage())); + +//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Two_ref_value_params_case +var _ = (Func)(() => //int + Numbers.AddTwoTwo( + ref Numbers.GetInt(), + ref Numbers.GetInt())); + +//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Original_case +var _ = (Func)(() => //int + Numbers.AddTwo(ref Numbers.GetInt())); + +//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Class_ref_param_case +var _ = (Func)(() => //string + Numbers.AckMessage(ref Numbers.GetMessage())); + +//Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.Original_case +var _ = (Action)((int n) => //void +{ + switch (n) + { + case 1: + Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.AddCase("1"); + break; + case 2: + Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.AddCase("2"); + break; + }; +}); + +//Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.Not_so_original_case +var _ = (Action)((int n) => //void +{ + switch (n) + { + case 1: + Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.DebugWriteCase( + "Case", + 1); + break; + case 2: + Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.DebugWriteCase( + "Case", + 2); + break; + }; +}); + +//Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.Original_case +var _ = (Action)((int n) => //void +{ + switch (n) + { + case 1: + Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.AddCase("1"); + break; + case 2: + Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.AddCase("2"); + break; + }; +}); + +//Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.Not_so_original_case +var _ = (Action)((int n) => //void +{ + switch (n) + { + case 1: + Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.DebugWriteCase( + "Case", + 1); + break; + case 2: + Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.DebugWriteCase( + "Case", + 2); + break; + }; +}); + +//Issue430_TryCatch_Bad_label_content_in_ILGenerator.Original_case +var _ = (Func)(() => //int +{ + try + { + Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); + return 1; + } + catch (Exception) + { + return 10; + } + Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); + return 5; +}); + +//Issue430_TryCatch_Bad_label_content_in_ILGenerator.Original_case +var _ = (Func)(() => //int +{ + try + { + Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); + return 1; + } + catch (Exception) + { + return 10; + } + Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); + return 5; +}); + +//Issue430_TryCatch_Bad_label_content_in_ILGenerator.Original_case +var _ = (Func)(() => //int +{ + try + { + Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); + return 1; + } + catch (Exception) + { + return 10; + } + Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); + return 5; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining_for_SystemCompile_with_Execute_no_assigning +var _ = (Func)(() => //int +{ + int myVar = default; + myVar = 5; + _ = TestClass.ExecuteFunc((Func)(() => //int + myVar + 3)); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining_for_SystemCompile_with_Execute +var _ = (Func)(() => //int +{ + int myVar = default; + TestClass.ExecuteAction((Action)(() => //void + { + myVar = 3; + })); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining +var _ = (Func)(() => //int +{ + int myVar = default; + ((Action)(() => //void + { + myVar = 3; + })) + .Invoke(); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Simplified_test_no_inlining +var _ = (Func)(() => //int +{ + int myVar = default; + myVar = 5; + ((Action)(() => //void + { + myVar = 3; + })) + .Invoke(); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Simplified_test +var _ = (Func)(() => //int +{ + int myVar = default; + myVar = 5; + ((Action)(() => //void + { + myVar = 3; + })) + .Invoke(); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround_with_struct +var _ = (Action)((Action lambda) => //void +{ + lambda.Invoke(); +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround_with_struct +var _ = (Func>)(() => //Val +{ + Val myVar = null; + myVar = new Val() + { + Value = 5 + }; + ((Action)((Action lambda) => //void + { + lambda.Invoke(); + })) + .Invoke( + (Action)(() => //void + { + myVar.Value = 3; + })); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable +var _ = (Action)((Action lambda) => //void +{ + lambda.Invoke(); +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable +var _ = (Func)(() => //int +{ + int myVar = default; + myVar = 5; + ((Action)((Action lambda) => //void + { + lambda.Invoke(); + })) + .Invoke( + (Action)(() => //void + { + myVar = 3; + })); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround +var _ = (Action)((Action lambda) => //void +{ + lambda.Invoke(); +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround +var _ = (Func>)(() => //Box +{ + Box myVar = null; + myVar = new Box() + { + Value = 5 + }; + ((Action)((Action lambda) => //void + { + lambda.Invoke(); + })) + .Invoke( + (Action)(() => //void + { + myVar.Value = 3; + })); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining_for_SystemCompile_with_Execute_no_assigning +var _ = (Func)(() => //int +{ + int myVar = default; + myVar = 5; + _ = TestClass.ExecuteFunc((Func)(() => //int + myVar + 3)); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining_for_SystemCompile_with_Execute +var _ = (Func)(() => //int +{ + int myVar = default; + TestClass.ExecuteAction((Action)(() => //void + { + myVar = 3; + })); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining +var _ = (Func)(() => //int +{ + int myVar = default; + ((Action)(() => //void + { + myVar = 3; + })) + .Invoke(); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Simplified_test_no_inlining +var _ = (Func)(() => //int +{ + int myVar = default; + myVar = 5; + ((Action)(() => //void + { + myVar = 3; + })) + .Invoke(); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Simplified_test +var _ = (Func)(() => //int +{ + int myVar = default; + myVar = 5; + ((Action)(() => //void + { + myVar = 3; + })) + .Invoke(); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround_with_struct +var _ = (Action)((Action lambda) => //void +{ + lambda.Invoke(); +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround_with_struct +var _ = (Func>)(() => //Val +{ + Val myVar = null; + myVar = new Val() + { + Value = 5 + }; + ((Action)((Action lambda) => //void + { + lambda.Invoke(); + })) + .Invoke( + (Action)(() => //void + { + myVar.Value = 3; + })); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable +var _ = (Action)((Action lambda) => //void +{ + lambda.Invoke(); +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable +var _ = (Func)(() => //int +{ + int myVar = default; + myVar = 5; + ((Action)((Action lambda) => //void + { + lambda.Invoke(); + })) + .Invoke( + (Action)(() => //void + { + myVar = 3; + })); + return myVar; +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround +var _ = (Action)((Action lambda) => //void +{ + lambda.Invoke(); +}); + +//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround +var _ = (Func>)(() => //Box +{ + Box myVar = null; + myVar = new Box() + { + Value = 5 + }; + ((Action)((Action lambda) => //void + { + lambda.Invoke(); + })) + .Invoke( + (Action)(() => //void + { + myVar.Value = 3; + })); + return myVar; +}); + +//Issue439_Support_unused_Field_access_in_Block.Original_case +var _ = (Func)(() => //int +{ + TestClass testClass = null; + testClass = new TestClass(); + testClass.Result0; + testClass.Result1 = testClass.Result0; + return testClass.Result1; +}); + +//Issue439_Support_unused_Field_access_in_Block.Original_case +var _ = (Func)(() => //int +{ + TestClass testClass = null; + testClass = new TestClass(); + testClass.Result0; + testClass.Result1 = testClass.Result0; + return testClass.Result1; +}); + +//Issue440_Errors_with_simplified_Switch_cases.Switch_with_single_case_without_default +var _ = (Func)(() => //int +{ + switch (1) + { + case 1: + goto after_switch; + break; + } + after_switch:; + return 2; +}); + +//Issue440_Errors_with_simplified_Switch_cases.Switch_with_no_cases_but_default +var _ = (Func)(() => //int +{ + switch (1) + { + default: + return 42; + } +}); + +//Issue440_Errors_with_simplified_Switch_cases.Switch_with_no_cases +var _ = (Func)(() => //int +{ + return 2; +}); + +//Issue440_Errors_with_simplified_Switch_cases.Switch_with_single_case_without_default +var _ = (Func)(() => //int +{ + switch (1) + { + case 1: + goto after_switch; + break; + } + after_switch:; + return 2; +}); + +//Issue440_Errors_with_simplified_Switch_cases.Switch_with_no_cases_but_default +var _ = (Func)(() => //int +{ + switch (1) + { + default: + return 42; + } +}); + +//Issue440_Errors_with_simplified_Switch_cases.Switch_with_no_cases +var _ = (Func)(() => //int +{ + return 2; +}); + +//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Original_case +var _ = (Func)(() => //int +{ + return TestClass.MethodThatTakesARefInt(42); +}); + +//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Case_with_string +var _ = (Func)(() => //int +{ + return TestClass.MethodThatTakesARefString("42"); +}); + +//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Case_with_nullable +var _ = (Func)(() => //int +{ + return TestClass.MethodThatTakesARefNullable((int?)null); +}); + +//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Original_case +var _ = (Func)(() => //int +{ + return TestClass.MethodThatTakesARefInt(42); +}); + +//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Case_with_string +var _ = (Func)(() => //int +{ + return TestClass.MethodThatTakesARefString("42"); +}); + +//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Case_with_nullable +var _ = (Func)(() => //int +{ + return TestClass.MethodThatTakesARefNullable((int?)null); +}); + +//Issue442_TryCatch_and_the_Goto_outside_problems.Original_case_2 +var _ = (Func)(() => //int +{ + int int_0 = default; + try + { + goto label; + throw default(Exception)/*NOTE: Provide the non-default value for the Constant!*/; + label:; + return int_0 = 2; + } + catch (Exception ex) + { + int_0 = 50; + } + return int_0; +}); + +//Issue442_TryCatch_and_the_Goto_outside_problems.Original_case_1 +var _ = (Func)(() => //int +{ + int variable = default; + try + { + variable = 5; + goto label; + } + catch (Exception) + { + variable = 10; + } + label:; + return variable; +}); + +//Issue442_TryCatch_and_the_Goto_outside_problems.Original_case_2 +var _ = (Func)(() => //int +{ + int int_0 = default; + try + { + goto label; + throw default(Exception)/*NOTE: Provide the non-default value for the Constant!*/; + label:; + return int_0 = 2; + } + catch (Exception ex) + { + int_0 = 50; + } + return int_0; +}); + +//Issue442_TryCatch_and_the_Goto_outside_problems.Original_case_1 +var _ = (Func)(() => //int +{ + int variable = default; + try + { + variable = 5; + goto label; + } + catch (Exception) + { + variable = 10; + } + label:; + return variable; +}); + +//Issue443_Nested_Calls_with_lambda_parameters.Original_case +var _ = (Func)(() => //int + TestClass.ExecuteDelegate((Func)(() => //int + { + int local = default; + local = 42; + return TestClass.ExecuteDelegate((Func)(() => //int + local)); + }))); + +//Issue443_Nested_Calls_with_lambda_parameters.Case_with_Invoke_NoInlining +var _ = (Func)(() => //int + TestClass.ExecuteDelegate((Func)(() => //int + { + int local = default; + local = 42; + return ((Func)(() => //int + local)) + .Invoke(); + }))); + +//Issue443_Nested_Calls_with_lambda_parameters.Case_with_Invoke +var _ = (Func)(() => //int + TestClass.ExecuteDelegate((Func)(() => //int + { + int local = default; + local = 42; + return ((Func)(() => //int + local)) + .Invoke(); + }))); + +//Issue443_Nested_Calls_with_lambda_parameters.Original_case +var _ = (Func)(() => //int + TestClass.ExecuteDelegate((Func)(() => //int + { + int local = default; + local = 42; + return TestClass.ExecuteDelegate((Func)(() => //int + local)); + }))); + +//Issue443_Nested_Calls_with_lambda_parameters.Case_with_Invoke_NoInlining +var _ = (Func)(() => //int + TestClass.ExecuteDelegate((Func)(() => //int + { + int local = default; + local = 42; + return ((Func)(() => //int + local)) + .Invoke(); + }))); + +//Issue443_Nested_Calls_with_lambda_parameters.Case_with_Invoke +var _ = (Func)(() => //int + TestClass.ExecuteDelegate((Func)(() => //int + { + int local = default; + local = 42; + return ((Func)(() => //int + local)) + .Invoke(); + }))); + +//Issue449_MemberInit_produces_InvalidProgram.Original_case +var _ = (Func)(() => //SampleType + new SampleType() + { + Value = (int?)666 + }); + +//Issue449_MemberInit_produces_InvalidProgram.Struct_without_ctor_case +var _ = (Func)(() => //SampleType_NoCtor + new SampleType_NoCtor() + { + Value = (int?)666 + }); + +//Issue449_MemberInit_produces_InvalidProgram.Original_case +var _ = (Func)(() => //SampleType + new SampleType() + { + Value = (int?)666 + }); + +//Issue449_MemberInit_produces_InvalidProgram.Struct_without_ctor_case +var _ = (Func)(() => //SampleType_NoCtor + new SampleType_NoCtor() + { + Value = (int?)666 + }); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.ConvertChecked_int_to_byte_enum +var _ = (Func)((int n) => //Hey + (Hey)n); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_int_to_byte_enum +var _ = (Func)((int n) => //Hey + (Hey)n); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_byte_to_enum +var _ = (Func)(() => //Hey + (Hey)(byte)5); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_byte_to_nullable_enum +var _ = (Func)(() => //Hey? + (Hey?)(byte)5); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_to_nullable_given_the_conv_op_of_underlying_to_underlying +var _ = (Func)(() => //Jazz? + (Jazz?)(int?)42); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_into_the_underlying_nullable_type +var _ = (Func)(() => //byte? + (byte?)(Hey?)Hey.Sailor); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_into_the_compatible_to_underlying_nullable_type +var _ = (Func)(() => //int? + (int?)(Hey?)Hey.Sailor); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_conv_op +var _ = (Func)(() => //Foo + (Foo)(Hey?)Hey.Sailor); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_Passed_conv_method +var _ = (Func)(() => //Foo + (Foo)(Hey?)Hey.Sailor); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_conv_op_with_nullable_param +var _ = (Func)(() => //Bar + (Bar)(Hey?)null); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Original_case +var _ = (Func)(() => //bool + (bool)new SampleType((bool?)null)); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Original_case +var _ = (Func)(() => //bool? + (bool?)new SampleType((bool?)null)); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.The_operator_method_is_provided_in_Convert +var _ = (Func)(() => //bool? + (bool?)new SampleType((bool?)null)); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.ConvertChecked_int_to_byte_enum +var _ = (Func)((int n) => //Hey + (Hey)n); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_int_to_byte_enum +var _ = (Func)((int n) => //Hey + (Hey)n); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_byte_to_enum +var _ = (Func)(() => //Hey + (Hey)(byte)5); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_byte_to_nullable_enum +var _ = (Func)(() => //Hey? + (Hey?)(byte)5); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_to_nullable_given_the_conv_op_of_underlying_to_underlying +var _ = (Func)(() => //Jazz? + (Jazz?)(int?)42); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_into_the_underlying_nullable_type +var _ = (Func)(() => //byte? + (byte?)(Hey?)Hey.Sailor); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_into_the_compatible_to_underlying_nullable_type +var _ = (Func)(() => //int? + (int?)(Hey?)Hey.Sailor); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_conv_op +var _ = (Func)(() => //Foo + (Foo)(Hey?)Hey.Sailor); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_Passed_conv_method +var _ = (Func)(() => //Foo + (Foo)(Hey?)Hey.Sailor); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_conv_op_with_nullable_param +var _ = (Func)(() => //Bar + (Bar)(Hey?)null); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Original_case +var _ = (Func)(() => //bool + (bool)new SampleType((bool?)null)); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Original_case +var _ = (Func)(() => //bool? + (bool?)new SampleType((bool?)null)); + +//Issue451_Operator_implicit_explicit_produces_InvalidProgram.The_operator_method_is_provided_in_Convert +var _ = (Func)(() => //bool? + (bool?)new SampleType((bool?)null)); + +//Issue455_TypeAs_should_return_null.Original_case +var _ = (Func)(() => //int? +{ + int? x = null; + return x = (object)((long)12345) as int?; +}); + +//Issue455_TypeAs_should_return_null.Original_case +var _ = (Func)(() => //int? +{ + int? x = null; + return x = (object)((long)12345) as int?; +}); + +//Issue458_Support_TryFault.Original_case2 +var _ = (Func)(() => //int +{ + int x = default; + try + { + var fault = 0; // emulating try-fault + try + { + x = 1; + throw new Exception(); + } + catch (Exception) when (fault++ != 0) {} + finally + {if (fault != 0) { + x = 2; + }} + } + catch (Exception) + { + return -1; + } + return x; +}); + +//Issue458_Support_TryFault.Original_case1 +var _ = (Func)(() => //bool +{ + var fault = 0; // emulating try-fault + try + { + return true; + } + catch (Exception) when (fault++ != 0) {} + finally + {if (fault != 0) { + return false; + }} +}); + +//Issue458_Support_TryFault.Original_case2 +var _ = (Func)(() => //int +{ + int x = default; + try + { + var fault = 0; // emulating try-fault + try + { + x = 1; + throw new Exception(); + } + catch (Exception) when (fault++ != 0) {} + finally + {if (fault != 0) { + x = 2; + }} + } + catch (Exception) + { + return -1; + } + return x; +}); + +//Issue458_Support_TryFault.Original_case1 +var _ = (Func)(() => //bool +{ + var fault = 0; // emulating try-fault + try + { + return true; + } + catch (Exception) when (fault++ != 0) {} + finally + {if (fault != 0) { + return false; + }} +}); + +//Issue460_ArgumentException_when_converting_from_object_to_type_with_explicit_operator.Original_case1 +var _ = (Action)(( + object instance, + object parameter) => //void +{ + ((TestClass)instance).ClassProp = (TestClass2)parameter; +}); + +//Issue460_ArgumentException_when_converting_from_object_to_type_with_explicit_operator.Original_case1 +var _ = (Action)(( + object instance, + object parameter) => //void +{ + ((TestClass)instance).ClassProp = (TestClass2)parameter; +}); + +//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_equal_nullable_and_object_null +var _ = (InFunc)((in XX? xx) => //bool + xx == null); + +//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_equal_nullable_and_nullable_null_on_the_left +var _ = (InFunc)((in XX? xx) => //bool + (XX?)null != xx); + +//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_not_equal_nullable_decimal +var _ = (Func)((Decimal? d) => //bool + d != (Decimal?)null); + +//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Original_case +var _ = (InFunc)((in Target p) => //bool + p == null); + +//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Original_case_null_on_the_right +var _ = (InFunc)((in Target p) => //bool + null != p); + +//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_equal_nullable_and_object_null +var _ = (InFunc)((in XX? xx) => //bool + xx == null); + +//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_equal_nullable_and_nullable_null_on_the_left +var _ = (InFunc)((in XX? xx) => //bool + (XX?)null != xx); + +//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_not_equal_nullable_decimal +var _ = (Func)((Decimal? d) => //bool + d != (Decimal?)null); + +//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Original_case +var _ = (InFunc)((in Target p) => //bool + p == null); + +//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Original_case_null_on_the_right +var _ = (InFunc)((in Target p) => //bool + null != p); + +// IssueTests are passing in 1459 ms. + +// ALL 1655 tests are passing in 1459 ms. From 088371db2e1cc479d55e3f0c7b5558633faadcce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 21:19:16 +0000 Subject: [PATCH 6/7] Remove accidentally committed .out file; update .gitignore to exclude printcs_*.out Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com> --- .gitignore | 2 + printcs_20260413-01.out | 9005 --------------------------------------- 2 files changed, 2 insertions(+), 9005 deletions(-) delete mode 100644 printcs_20260413-01.out diff --git a/.gitignore b/.gitignore index f4da823c..f6657501 100644 --- a/.gitignore +++ b/.gitignore @@ -258,3 +258,5 @@ FastExpressionCompiler.Internal/ # Scala Metals in VSCode metals.**.out +*.out +printcs_*.out diff --git a/printcs_20260413-01.out b/printcs_20260413-01.out deleted file mode 100644 index 3eab182f..00000000 --- a/printcs_20260413-01.out +++ /dev/null @@ -1,9005 +0,0 @@ - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.Quicksort_partition_with_nested_loops -var _ = (Action)(( - int[] arr, - int low, - int high) => //void -{ - int i = default; - int j = default; - int pivot = default; - int temp = default; - int compareResult = default; - i = low; - j = high; - pivot = arr[(i + j) / 2]; - while (true) - { - if (i > j) - { - goto endMain; - } - while (true) - { - continue1:; - compareResult = arr[i].CompareTo(pivot); - if (compareResult == -1) - { - i++; - goto continue1; - } - goto endSub1; - } - endSub1:; - while (true) - { - continue2:; - compareResult = pivot.CompareTo(arr[j]); - if (compareResult == -1) - { - j--; - goto continue2; - } - goto endSub2; - } - endSub2:; - if (i <= j) - { - temp = arr[i]; - arr[i] = arr[j]; - arr[j] = temp; - i++; - j--; - } - } - endMain:; -}); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.Comparison_function_with_goto_labels -var _ = (Func)(( - int left, - int right) => //int -{ - int compareResult = default; - compareResult = left.CompareTo(right); - compareResult = -compareResult; - if (compareResult == -1) - { - return -1; - } - return 1; -}); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_NullableInt_ArrayAccessError -var _ = (Func[]>, int?>)((List[]> dataArrayList) => //int? -{ - int left_ListIndex = default; - int left_ArrayIndex = default; - int? left_0 = null; - left_ListIndex = 0; - left_ArrayIndex = 0; - left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; - endMain:; - return left_0; -}); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_Int_ArrayAccessError -var _ = (Func, int>)((List dataArrayList) => //int -{ - int left_ListIndex = default; - int left_ArrayIndex = default; - int left_0 = default; - left_ListIndex = 0; - left_ArrayIndex = 0; - left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; - endMain:; - return left_0; -}); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_String_ArrayAccessError -var _ = (Func, string>)((List dataArrayList) => //string -{ - int left_ListIndex = default; - int left_ArrayIndex = default; - string left_0 = null; - left_ListIndex = 0; - left_ArrayIndex = 0; - left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; - endMain:; - return left_0; -}); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_Struct_ArrayAccess -var _ = (Func, int?>)((List dataArrayList) => //int? -{ - int left_ListIndex = default; - int left_ArrayIndex = default; - int? left_0 = null; - left_ListIndex = 0; - left_ArrayIndex = 0; - left_0 = dataArrayList[left_ListIndex][left_ArrayIndex].Foo; - endMain:; - return left_0; -}); - -//Issue498_InvalidProgramException_when_using_loop.Original_test -var _ = (Func)(() => //int -{ - int result = default; - int x = default; - while (true) - { - while (true) - { - continue1:; - if (x >= 10) - { - return result; - } - result += 1; - x += 1; - } - endSub1:; - } - endMain:; -}); - -//Issue495_Incomplete_pattern_detection_for_NotSupported_1007_Return_goto_from_TryCatch_with_Assign_generates_invalid_IL.ReturnGotoFromTryCatchWithAssign_ShouldBeDetectedAsError1007 -var _ = (Func)(() => //object -{ - object @var = null; - object finalResult = null; - try - { - @var = "hello"; - if (@var != null) - { - return finalResult = @var; - } - finalResult = "default"; - @return:; - } - catch (Exception ex) - { - ; - } - return finalResult; -}); - -//Issue495_Incomplete_pattern_detection_for_NotSupported_1007_Return_goto_from_TryCatch_with_Assign_generates_invalid_IL.ReturnGotoFromTryCatchWithAssign_ShouldBeDetectedAsError1007_null_path -var _ = (Func)(() => //object -{ - object @var = null; - object finalResult = null; - try - { - @var = null; - if (@var != null) - { - return finalResult = @var; - } - finalResult = "default"; - @return:; - } - catch (Exception ex) - { - ; - } - return finalResult; -}); - -//Issue480_Issue480_CLR_detected_an_invalid_program_exception.Reduced_conditional_emit -var _ = (Func)((bool input) => //object - (object)(((true) ? input : true) || ((true) ? input : false))); - -//Issue480_Issue480_CLR_detected_an_invalid_program_exception.Modified_case -var _ = (Func)(() => //object - (object)(((true) ? (bool?)null : (bool?)null) || ((true) ? (bool?)true : (bool?)null))); - -//Issue480_Issue480_CLR_detected_an_invalid_program_exception.Original_case -var _ = (Func)(() => //object - (object)(((true) ? (bool?)null : (bool?)null) || ((true) ? (bool?)null : (bool?)null))); - -//Issue480_Issue480_CLR_detected_an_invalid_program_exception.Reduced_conditional_interpretation -var _ = (Func)(() => //object - (object)(((true) ? false : true) || ((true) ? true : false))); - -//Issue487_Fix_ToCSharpString_output_for_boolean_equality_expressions.Original_case -var _ = x.MyTestBool; - -//Issue490_Regression_in_compiling_lambdas_with_ref_struct_parameters.Return_true_when_token_is_null -var _ = (RefStructReaderDelegate)((ref MyJsonReader reader) => //bool - (reader.TokenType == MyJsonTokenType.Null) ? true : false); - -//Issue490_Regression_in_compiling_lambdas_with_ref_struct_parameters.Return_false_when_token_is_not_null -var _ = (RefStructReaderDelegate)((ref MyJsonReader reader) => //bool - (reader.TokenType == MyJsonTokenType.Null) ? true : false); - -//Issue490_Regression_in_compiling_lambdas_with_ref_struct_parameters.Original_case -var _ = (TestDelegate)((ref Utf8JsonReader utf8JsonReader_0) => //int - (utf8JsonReader_0.TokenType == JsonTokenType.Null) ? default(int) : - utf8JsonReader_0.GetInt32()); - -//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_with_first_and_last_outliers -var _ = (Func)((int int_0) => //int -{ - switch (int_0) - { - case 3: - case -10: - return -3; - case 5: - case 4: - return 4; - case 6: - return 6; - case 7: - return 7; - case 20: - return 20; - default: - return -1; - } -}); - -//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_the_bytes_two_ranges_NOT_SUPPORTED_YET -var _ = (Func)((sbyte sbyte_0) => //int -{ - switch (sbyte_0) - { - case (sbyte)3: - return 3; - case (sbyte)4: - return 4; - case (sbyte)5: - return 5; - case (sbyte)6: - return 6; - case (sbyte)15: - return 15; - case (sbyte)16: - return 16; - case (sbyte)17: - return 17; - case (sbyte)18: - return 18; - default: - return -1; - } -}); - -//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_the_long -var _ = (Func)((long long_0) => //long -{ - switch (long_0) - { - case (long)1: - return (long)1; - case (long)3: - return (long)3; - case (long)4: - return (long)4; - case (long)5: - return (long)5; - case (long)6: - return (long)6; - case (long)8: - return (long)8; - default: - return (long)-1; - } -}); - -//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_minimal_number_of_cases_enabling_OpCodesSwitch_and_no_default_case -var _ = (Func)((int int_0) => //int -{ - switch (int_0) - { - case 0: - int_0 = 42; - break; - case 3: - case 1: - int_0 = 31; - break; - case 2: - int_0 = 2; - break; - case 6: - case 7: - int_0 = 67; - break; - } - return int_0; -}); - -//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_all_integer_cases_starting_from_0 -var _ = (Func)((int int_0) => //int -{ - switch (int_0) - { - case 0: - return 0; - case 1: - return 1; - case 4: - case 3: - return 3; - case 6: - return 6; - case 5: - return 5; - default: - return -1; - } -}); - -//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_the_bytes -var _ = (Func)((sbyte sbyte_0) => //int -{ - switch (sbyte_0) - { - case (sbyte)-3: - return -3; - case (sbyte)3: - return 3; - case (sbyte)4: - return 4; - case (sbyte)5: - return 5; - case (sbyte)6: - return 6; - case (sbyte)12: - return 12; - default: - return -1; - } -}); - -//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_the_enums -var _ = (Func)((IntEnum intEnum_0) => //int -{ - switch (intEnum_0) - { - case IntEnum.One: - return 1; - case IntEnum.Three: - return 3; - case IntEnum.Four: - return 4; - case IntEnum.Five: - return 5; - case IntEnum.Six: - return 6; - default: - return -1; - } -}); - -//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_integer_cases_starting_from_Not_0 -var _ = (Func)((int int_0) => //int -{ - switch (int_0) - { - case 1: - return 1; - case 3: - return 3; - case 4: - return 4; - case 5: - return 5; - case 6: - return 6; - default: - return -1; - } -}); - -//Issue398_Optimize_Switch_with_OpCodes_Switch.Test_switch_for_nullable_integer_types -var _ = (Func)((int? int__0) => //int -{ - switch (int__0) - { - case (int?)null: - return 0; - case (int?)0: - return 0; - case (int?)1: - return 1; - case (int?)2: - return 2; - case (int?)3: - return 3; - case (int?)4: - return 4; - case (int?)5: - return 5; - default: - return -1; - } -}); - -//Issue468_Optimize_the_delegate_access_to_the_Closure_object_for_the_modern_NET.Original_expression -var _ = (Func)(() => //bool - ((1 + 2) == (5 + -2)) == (42 == 42)); - -//Issue468_Optimize_the_delegate_access_to_the_Closure_object_for_the_modern_NET.Original_expression_with_closure -var _ = (Func)(() => //bool - ((1 + 2) == (5 + -2)) == (42 == default(ValueRef)/*NOTE: Provide the non-default value for the Constant!*/.Value)); - -//Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.Logical_expression_started_with_not_Without_Interpreter_due_param_use -var _ = (Func)((bool p) => //bool - !(true && p)); - -//Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.Logical_expression_started_with_not -var _ = (Func)((bool p) => //bool - !((true && false)) || p); - -//Issue473_InvalidProgramException_when_using_Expression_Condition_with_converted_decimal_expression.Original_case -var _ = (Func)(() => //Decimal - (((Decimal)0) == default(Decimal)) ? 3m : - ((Decimal)0) * 3m); - -//Issue476_System_ExecutionEngineException_with_nullables_on_repeated_calls_to_ConcurrentDictionary.Original_case -var _ = (Func)((Record @record) => //bool - @record.Timestamp != (DateTimeOffset?)null); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.Quicksort_partition_with_nested_loops -var _ = (Action)(( - int[] arr, - int low, - int high) => //void -{ - int i = default; - int j = default; - int pivot = default; - int temp = default; - int compareResult = default; - i = low; - j = high; - pivot = arr[(i + j) / 2]; - while (true) - { - if (i > j) - { - goto endMain; - } - while (true) - { - continue1:; - compareResult = arr[i].CompareTo(pivot); - if (compareResult == -1) - { - i++; - goto continue1; - } - goto endSub1; - } - endSub1:; - while (true) - { - continue2:; - compareResult = pivot.CompareTo(arr[j]); - if (compareResult == -1) - { - j--; - goto continue2; - } - goto endSub2; - } - endSub2:; - if (i <= j) - { - temp = arr[i]; - arr[i] = arr[j]; - arr[j] = temp; - i++; - j--; - } - } - endMain:; -}); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.Comparison_function_with_goto_labels -var _ = (Func)(( - int left, - int right) => //int -{ - int compareResult = default; - compareResult = left.CompareTo(right); - compareResult = -compareResult; - if (compareResult == -1) - { - return -1; - } - return 1; -}); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_NullableInt_ArrayAccessError -var _ = (Func[]>, int?>)((List[]> dataArrayList) => //int? -{ - int left_ListIndex = default; - int left_ArrayIndex = default; - int? left_0 = null; - left_ListIndex = 0; - left_ArrayIndex = 0; - left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; - endMain:; - return left_0; -}); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_Int_ArrayAccessError -var _ = (Func, int>)((List dataArrayList) => //int -{ - int left_ListIndex = default; - int left_ArrayIndex = default; - int left_0 = default; - left_ListIndex = 0; - left_ArrayIndex = 0; - left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; - endMain:; - return left_0; -}); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_String_ArrayAccessError -var _ = (Func, string>)((List dataArrayList) => //string -{ - int left_ListIndex = default; - int left_ArrayIndex = default; - string left_0 = null; - left_ListIndex = 0; - left_ArrayIndex = 0; - left_0 = dataArrayList[left_ListIndex][left_ArrayIndex]; - endMain:; - return left_0; -}); - -//Issue499_InvalidProgramException_for_Sorting_and_comparison_function.ArrayInList_Struct_ArrayAccess -var _ = (Func, int?>)((List dataArrayList) => //int? -{ - int left_ListIndex = default; - int left_ArrayIndex = default; - int? left_0 = null; - left_ListIndex = 0; - left_ArrayIndex = 0; - left_0 = dataArrayList[left_ListIndex][left_ArrayIndex].Foo; - endMain:; - return left_0; -}); - -//## .NET Latest (Core): Running UnitTests and IssueTests in parallel... - -//ArithmeticOperationsTests.Can_modulus_custom_in_Action_block -var _ = (Action)(( - BigInteger a, - BigInteger b) => //void -{ - _ = a % b; -}); - -//ArithmeticOperationsTests.Can_modulus_custom_in_Action -var _ = (Action)(( - BigInteger a, - BigInteger b) => //void -{ - _ = a % b; -}); - -//ArithmeticOperationsTests.Can_add_string_and_not_string -var _ = (Func)(() => //string - default(c__DisplayClass37_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s1 + ((object)default(c__DisplayClass37_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s2)); - -//ArithmeticOperationsTests.Can_modulus_custom -var _ = (Func)(( - BigInteger a, - BigInteger b) => //BigInteger - a % b); - -//Issue44_Conversion_To_Nullable_Throws_Exception.Conversion_to_nullable_should_work_with_null_constructed_with_expressions -var _ = (Func)(() => //int? - (int?)null); - -//Issue44_Conversion_To_Nullable_Throws_Exception.Conversion_to_nullable_should_work_with_null_constructed_with_expressions -var _ = (Func)(() => //int? - (int?)null); - -//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfStruct -var _ = (ActionRef)((ref RecVal recVal_0) => //void -{ - RecVal recVal_1 = default; - recVal_1 = recVal_0; - Issue55_CompileFast_crash_with_ref_parameter.SetMinus1_OfStruct(ref recVal_1); -}); - -//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfString -var _ = (ActionRef)((ref string string_0) => //void -{ - string string_1 = null; - string_1 = string_0; - Issue55_CompileFast_crash_with_ref_parameter.SetMinus1_OfString(ref string_1); -}); - -//Issue55_CompileFast_crash_with_ref_parameter.BlockWithNonRefStatementLast -var _ = (ActionRef)((ref uint uint_0) => //void -{ - double double_1 = default; - uint_0 = (uint)3; - double_1 = 0; -}); - -//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfInt -var _ = (ActionRef)((ref int int_0) => //void -{ - int int_1 = default; - int_1 = int_0; - Issue55_CompileFast_crash_with_ref_parameter.SetMinus1(ref int_1); -}); - -//ArithmeticOperationsTests.Can_modulus_custom_in_Action_block -var _ = (Action)(( - BigInteger a, - BigInteger b) => //void -{ - _ = a % b; -}); - -//ArithmeticOperationsTests.Can_modulus_custom_in_Action -var _ = (Action)(( - BigInteger a, - BigInteger b) => //void -{ - _ = a % b; -}); - -//ArithmeticOperationsTests.Can_add_string_and_not_string -var _ = (Func)(() => //string - default(c__DisplayClass37_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s1 + ((object)default(c__DisplayClass37_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s2)); - -//ArithmeticOperationsTests.Can_modulus_custom -var _ = (Func)(( - BigInteger a, - BigInteger b) => //BigInteger - a % b); - -//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfStruct -var _ = (ActionRef)((ref RecVal recVal_0) => //void -{ - RecVal recVal_1 = default; - recVal_1 = recVal_0; - Issue55_CompileFast_crash_with_ref_parameter.SetMinus1_OfStruct(ref recVal_1); -}); - -//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfString -var _ = (ActionRef)((ref string string_0) => //void -{ - string string_1 = null; - string_1 = string_0; - Issue55_CompileFast_crash_with_ref_parameter.SetMinus1_OfString(ref string_1); -}); - -//Issue55_CompileFast_crash_with_ref_parameter.BlockWithNonRefStatementLast -var _ = (ActionRef)((ref uint uint_0) => //void -{ - double double_1 = default; - uint_0 = (uint)3; - double_1 = 0; -}); - -//Issue55_CompileFast_crash_with_ref_parameter.RefMethodCallingRefMethodWithLocal_OfInt -var _ = (ActionRef)((ref int int_0) => //void -{ - int int_1 = default; - int_1 = int_0; - Issue55_CompileFast_crash_with_ref_parameter.SetMinus1(ref int_1); -}); - -//AssignTests.Array_multi_dimensional_index_assign_value_type_block -var _ = (Func)(() => //int -{ - int[,] int__a_0 = null; - int__a_0 = new int[ - 2, - 1]; - int__a_0[1, 0] = 5; - return int__a_0[1, 0]; -}); - -//AssignTests.Can_assign_to_parameter_in_nested_lambda -var _ = (Func>)((string s) => //Func - (Func)(() => //string - s = "aaa")); - -//AssignTests.Parameter_test_try_catch_finally_result -T __f(System.Func f) => f(); -var _ = (Func)((TryCatchTest tryCatchTest_0) => //TryCatchTest -{ - tryCatchTest_0 = - __f(() => { - try - { - return new TryCatchTest(); - } - catch (Exception) - { - return (TryCatchTest)null; - } - }); - return tryCatchTest_0; -}); - -//Issue65_Add_ExpressionInfo_Elvis_operator_support.Test -var _ = (Func)((int n) => //string -{ - A x = null; - x = Issue65_Add_LightExpression_Elvis_operator_support.GetAnA(n); - return (x == (A)null) ? null : - x.GetTheAnswer(); -}); - -//AssignTests.Member_test_try_catch_finally_result -T __f(System.Func f) => f(); -var _ = (Func)(() => //TryCatchTest -{ - try - { - TryCatchTest tryCatchTest_0 = null; - tryCatchTest_0 = new TryCatchTest(); - tryCatchTest_0.NestedTest = - __f(() => { - try - { - TryCatchNestedTest tryCatchNestedTest_1 = null; - tryCatchNestedTest_1 = new TryCatchNestedTest(); - tryCatchNestedTest_1.Nested = "Value"; - return tryCatchNestedTest_1; - } - catch (Exception) - { - return (TryCatchNestedTest)null; - } - }); - return tryCatchTest_0; - } - catch (Exception) - { - return (TryCatchTest)null; - } -}); - -//AssignTests.Array_multi_dimensional_index_assign_value_type_block -var _ = (Func)(() => //int -{ - int[,] int__a_0 = null; - int__a_0 = new int[ - 2, - 1]; - int__a_0[1, 0] = 5; - return int__a_0[1, 0]; -}); - -//AssignTests.Array_multi_dimensional_index_assign_value_type_block -var _ = (Func)(() => //int -{ - int[,] int__a_0 = null; - int__a_0 = new int[ - 2, - 1]; - int__a_0[1, 0] = 5; - return int__a_0[1, 0]; -}); - -//AssignTests.Can_assign_to_parameter_in_nested_lambda -var _ = (Func>)((string s) => //Func - (Func)(() => //string - s = "aaa")); - -//AssignTests.Parameter_test_try_catch_finally_result -T __f(System.Func f) => f(); -var _ = (Func)((TryCatchTest tryCatchTest_0) => //TryCatchTest -{ - tryCatchTest_0 = - __f(() => { - try - { - return new TryCatchTest(); - } - catch (Exception) - { - return (TryCatchTest)null; - } - }); - return tryCatchTest_0; -}); - -//AssignTests.Member_test_try_catch_finally_result -T __f(System.Func f) => f(); -var _ = (Func)(() => //TryCatchTest -{ - try - { - TryCatchTest tryCatchTest_0 = null; - tryCatchTest_0 = new TryCatchTest(); - tryCatchTest_0.NestedTest = - __f(() => { - try - { - TryCatchNestedTest tryCatchNestedTest_1 = null; - tryCatchNestedTest_1 = new TryCatchNestedTest(); - tryCatchNestedTest_1.Nested = "Value"; - return tryCatchNestedTest_1; - } - catch (Exception) - { - return (TryCatchNestedTest)null; - } - }); - return tryCatchTest_0; - } - catch (Exception) - { - return (TryCatchTest)null; - } -}); - -//BinaryExpressionTests.Issue399_Coalesce_for_nullable_long_and_non_nullable_long -var _ = (Action)(( - Source s, - Destination d) => //void -{ - d.NumberNonNullable = s.Number ?? (long)0; -}); - -//BinaryExpressionTests.Issue399_Coalesce_for_nullable_long_Automapper_test_Should_substitute_zero_for_null -var _ = (Action)(( - Source s, - Destination d) => //void -{ - d.Number = s.Number ?? (long?)(long)0; -}); - -//Issue76_Expression_Convert_causing_signature_or_security_transparency_is_not_compatible_exception.When_using_fast_expression_compilation -var _ = (Action)(( - TestTarget doc, - Guid id) => //void -{ - doc.ID = (CustomID)id; -}); - -//BinaryExpressionTests.Issue399_Coalesce_for_nullable_long_and_non_nullable_long -var _ = (Action)(( - Source s, - Destination d) => //void -{ - d.NumberNonNullable = s.Number ?? (long)0; -}); - -//Issue76_Expression_Convert_causing_signature_or_security_transparency_is_not_compatible_exception.When_using_fast_expression_compilation -var _ = (Action)(( - TestTarget doc, - Guid id) => //void -{ - doc.ID = (CustomID)id; -}); - -//BinaryExpressionTests.Issue399_Coalesce_for_nullable_long_Automapper_test_Should_substitute_zero_for_null -var _ = (Action)(( - Source s, - Destination d) => //void -{ - d.Number = s.Number ?? (long?)(long)0; -}); - -//Issue83_linq2db.linq2db_NullReferenceException -var _ = (Func)(( - IQueryRunner qr, - IDataReader dr) => //InheritanceA - ((Func)(( - IQueryRunner qr_1, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps) => //InheritanceA - { - SQLiteDataReader ldr = null; - ldr = (SQLiteDataReader)rd; - return ((ldr.IsDBNull(0) ? TypeCodeEnum.Base : - (TypeCodeEnum)ldr.GetInt32(0)) == TypeCodeEnum.A1) ? - (InheritanceA)(InheritanceA1)TableContext.OnEntityCreated( - dctx, - new InheritanceA1() - { - GuidValue = (ldr.IsDBNull(1) ? Guid.Parse("00000000-0000-0000-0000-000000000000") : - ldr.GetGuid(1)) - }) : - (InheritanceA)(InheritanceA2)TableContext.OnEntityCreated( - dctx, - new InheritanceA2() - { - GuidValue = (ldr.IsDBNull(1) ? Guid.Parse("00000000-0000-0000-0000-000000000000") : - ldr.GetGuid(1)) - }); - })) - .Invoke( - qr, - qr.DataContext, - dr, - qr.Expression, - qr.Parameters)); - -//BlockTests.Block_local_variable_assignment -var _ = (Func)(() => //int -{ - int int_0 = default; - int int_1 = default; - int_0 = 5; - return int_1 = 6; -}); - -//Issue83_linq2db.linq2db_InvalidProgramException2_reuse_variable_for_upper_and_nested_lambda -T __f(System.Func f) => f(); -var _ = (Func)(( - IQueryRunner qr, - IDataReader dr) => //object -{ - _ = ((Func)(( - IQueryRunner qr, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps) => //object - { - SQLiteDataReader ldr = null; - ldr = (SQLiteDataReader)rd; - return (object) - __f(() => { - _ = Issue83_linq2db.CheckNullValue( - rd, - "Average"); - return ldr.IsDBNull(0) ? 0 : - (double)Issue83_linq2db.ConvertDefault( - ldr.GetValue(0), - typeof(double)); - }); - })) - .Invoke( - qr, - qr.DataContext, - dr, - qr.Expression, - qr.Parameters); - return ((Func)(( - IQueryRunner qr, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps) => //object - { - SQLiteDataReader ldr = null; - ldr = (SQLiteDataReader)rd; - return (object) - __f(() => { - _ = Issue83_linq2db.CheckNullValue( - rd, - "Average"); - return ldr.IsDBNull(0) ? 0 : - (double)Issue83_linq2db.ConvertDefault( - ldr.GetValue(0), - typeof(double)); - }); - })) - .Invoke( - qr, - qr.DataContext, - dr, - qr.Expression, - qr.Parameters); -}); - -//BlockTests.Block_returning_the_nested_lambda_assigning_the_outer_parameter -var _ = (Func>)((int p) => //Func - (Func)(() => //int - p = 42)); - -//BlockTests.Block_calling_non_void_method_returning_the_nested_lambda_assigning_the_outer_parameter -var _ = (Func>)((int p) => //Func -{ - _ = BlockTests.Inc(p); - return (Func)(() => //int - p = 42); -}); - -//BlockTests.Block_calling_non_void_method_returning_the_nested_lambda_incrementing_the_outer_parameter -var _ = (Func>)((int p) => //Func -{ - return (Func)(() => //int - ++p); -}); - -//Issue83_linq2db.String_to_number_conversion_using_convert_with_method_with_DefaultExpression -var _ = (Func)((string p) => //int - (p != (string)null) ? (int)p : default(int)); - -//Issue83_linq2db.Jit_compiler_internal_limitation -var _ = (Action)(( - object obj, - object @value) => //void -{ - TestClass2 testClass2_0 = null; - TestClass3 testClass3_1 = null; - TestClass4 testClass4_2 = null; - testClass2_0 = ((TestClass1)obj).Class2; - if (testClass2_0 == null) - { - testClass2_0 = new TestClass2(); - ((TestClass1)obj).Class2 = testClass2_0; - } - testClass3_1 = testClass2_0.Class3; - if (testClass3_1 == null) - { - testClass3_1 = new TestClass3(); - testClass2_0.Class3 = testClass3_1; - } - testClass4_2 = testClass3_1.Class4; - if (testClass4_2 == null) - { - testClass4_2 = new TestClass4(); - testClass3_1.Class4 = testClass4_2; - } - testClass4_2.Field1 = (int)@value; -}); - -//BlockTests.Block_local_variable_assignment -var _ = (Func)(() => //int -{ - int int_0 = default; - int int_1 = default; - int_0 = 5; - return int_1 = 6; -}); - -//BlockTests.Block_local_variable_assignment_with_lambda_invoke -var _ = (Func)(() => //int -{ - int int_0 = default; - return ((Func)(() => //int - int_0 = 6)) - .Invoke(); -}); - -//BlockTests.Block_returning_the_nested_lambda_assigning_the_outer_parameter -var _ = (Func>)((int p) => //Func - (Func)(() => //int - p = 42)); - -//BlockTests.Block_calling_non_void_method_returning_the_nested_lambda_assigning_the_outer_parameter -var _ = (Func>)((int p) => //Func -{ - _ = BlockTests.Inc(p); - return (Func)(() => //int - p = 42); -}); - -//BlockTests.Block_calling_non_void_method_returning_the_nested_lambda_incrementing_the_outer_parameter -var _ = (Func>)((int p) => //Func -{ - return (Func)(() => //int - ++p); -}); - -//BlockTests.Block_assigning_local_variable_then_returning_the_nested_lambda_which_reassigns_the_variable -var _ = (Func>)(() => //Func -{ - string string_0 = null; - string_0 = "35"; - return (Func)(() => //string - string_0 = "42"); -}); - -//Issue83_linq2db.linq2db_InvalidProgramException3 -var _ = (Func)((IDataReader rd) => //int -{ - SQLiteDataReader ldr = null; - int int123 = default; - ldr = (SQLiteDataReader)rd; - return int123 = (ldr.IsDBNull(0) ? (int?)null : - new int?(ldr.GetInt32(0))) ?? Issue83_linq2db.GetDefault2(ldr.IsDBNull(0) ? 0 : - ldr.GetInt32(0)); -}); - -//ConditionalOperatorsTests.Ternarary_operator_with_logical_op -var _ = (Func)(() => //object - ((default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.x > 0) && ((default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.Contains("e") && default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.Contains("X")) || (default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.StartsWith("T") && default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.EndsWith("t")))) ? - string.Concat( - default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s, - "ccc") : - string.Empty); - -//Issue83_linq2db.linq2db_NullReferenceException -var _ = (Func)(( - IQueryRunner qr, - IDataReader dr) => //InheritanceA - ((Func)(( - IQueryRunner qr_1, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps) => //InheritanceA - { - SQLiteDataReader ldr = null; - ldr = (SQLiteDataReader)rd; - return ((ldr.IsDBNull(0) ? TypeCodeEnum.Base : - (TypeCodeEnum)ldr.GetInt32(0)) == TypeCodeEnum.A1) ? - (InheritanceA)(InheritanceA1)TableContext.OnEntityCreated( - dctx, - new InheritanceA1() - { - GuidValue = (ldr.IsDBNull(1) ? Guid.Parse("00000000-0000-0000-0000-000000000000") : - ldr.GetGuid(1)) - }) : - (InheritanceA)(InheritanceA2)TableContext.OnEntityCreated( - dctx, - new InheritanceA2() - { - GuidValue = (ldr.IsDBNull(1) ? Guid.Parse("00000000-0000-0000-0000-000000000000") : - ldr.GetGuid(1)) - }); - })) - .Invoke( - qr, - qr.DataContext, - dr, - qr.Expression, - qr.Parameters)); - -//ConditionalOperatorsTests.Ternarary_operator_with_logical_op -var _ = (Func)(() => //object - ((default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.x > 0) && ((default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.Contains("e") && default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.Contains("X")) || (default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.StartsWith("T") && default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s.EndsWith("t")))) ? - string.Concat( - default(c__DisplayClass9_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.s, - "ccc") : - string.Empty); - -//Issue83_linq2db.linq2db_InvalidProgramException2_reuse_variable_for_upper_and_nested_lambda -T __f(System.Func f) => f(); -var _ = (Func)(( - IQueryRunner qr, - IDataReader dr) => //object -{ - _ = ((Func)(( - IQueryRunner qr, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps) => //object - { - SQLiteDataReader ldr = null; - ldr = (SQLiteDataReader)rd; - return (object) - __f(() => { - _ = Issue83_linq2db.CheckNullValue( - rd, - "Average"); - return ldr.IsDBNull(0) ? 0 : - (double)Issue83_linq2db.ConvertDefault( - ldr.GetValue(0), - typeof(double)); - }); - })) - .Invoke( - qr, - qr.DataContext, - dr, - qr.Expression, - qr.Parameters); - return ((Func)(( - IQueryRunner qr, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps) => //object - { - SQLiteDataReader ldr = null; - ldr = (SQLiteDataReader)rd; - return (object) - __f(() => { - _ = Issue83_linq2db.CheckNullValue( - rd, - "Average"); - return ldr.IsDBNull(0) ? 0 : - (double)Issue83_linq2db.ConvertDefault( - ldr.GetValue(0), - typeof(double)); - }); - })) - .Invoke( - qr, - qr.DataContext, - dr, - qr.Expression, - qr.Parameters); -}); - -//Issue83_linq2db.String_to_number_conversion_using_convert_with_method_with_DefaultExpression -var _ = (Func)((string p) => //int - (p != (string)null) ? (int)p : default(int)); - -//Issue83_linq2db.Jit_compiler_internal_limitation -var _ = (Action)(( - object obj, - object @value) => //void -{ - TestClass2 testClass2_0 = null; - TestClass3 testClass3_1 = null; - TestClass4 testClass4_2 = null; - testClass2_0 = ((TestClass1)obj).Class2; - if (testClass2_0 == null) - { - testClass2_0 = new TestClass2(); - ((TestClass1)obj).Class2 = testClass2_0; - } - testClass3_1 = testClass2_0.Class3; - if (testClass3_1 == null) - { - testClass3_1 = new TestClass3(); - testClass2_0.Class3 = testClass3_1; - } - testClass4_2 = testClass3_1.Class4; - if (testClass4_2 == null) - { - testClass4_2 = new TestClass4(); - testClass3_1.Class4 = testClass4_2; - } - testClass4_2.Field1 = (int)@value; -}); - -//ConstantAndConversionTests.Issue464_Bound_closure_constants_can_be_modified_afterwards -var _ = (Func)(() => //int - default(Foo)/*NOTE: Provide the non-default value for the Constant!*/.Value); - -//ConstantAndConversionTests.Issue465_The_primitive_constant_can_be_configured_to_put_in_closure -var _ = (Func)(() => //int - default(ValueRef)/*NOTE: Provide the non-default value for the Constant!*/.Value); - -//ConstantAndConversionTests.Issue466_The_constant_may_be_referenced_multiple_times -var _ = (Func)(() => //int - default(ValueRef)/*NOTE: Provide the non-default value for the Constant!*/.Value + default(ValueRef)/*NOTE: Provide the non-default value for the Constant!*/.Value); - -//Issue83_linq2db.linq2db_InvalidProgramException3 -var _ = (Func)((IDataReader rd) => //int -{ - SQLiteDataReader ldr = null; - int int123 = default; - ldr = (SQLiteDataReader)rd; - return int123 = (ldr.IsDBNull(0) ? (int?)null : - new int?(ldr.GetInt32(0))) ?? Issue83_linq2db.GetDefault2(ldr.IsDBNull(0) ? 0 : - ldr.GetInt32(0)); -}); - -//ConvertOperatorsTests.Convert_Func_to_Custom_delegate_should_work -var _ = (Func, GetString>)((Func p) => //GetString - (GetString)(MethodInfo)default(RuntimeMethodInfo)/*NOTE: Provide the non-default value for the Constant!*/.CreateDelegate( - typeof(GetString), - p)); - -//ConvertOperatorsTests.Convert_Func_to_Custom_delegate_should_work -var _ = (Func, GetString>)((Func fs) => //GetString - (GetString)fs.Invoke); - -//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_via_comparison_method_with_non_nullable_parameters -var _ = (Func)((MyEnum? myEnum__0) => //string -{ - switch (myEnum__0) - { - case (MyEnum?)MyEnum.A: - return "A"; - case (MyEnum?)MyEnum.B: - return "B"; - case (MyEnum?)MyEnum.C: - return "C"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_to_non_nullable_cases_via_comparison_method_Impossible_both_should_be_nullable -var _ = (Func)((MyEnum? myEnum__0) => //string -{ - switch (myEnum__0) - { - case (MyEnum?)MyEnum.A: - return "A"; - case (MyEnum?)MyEnum.B: - return "B"; - case (MyEnum?)MyEnum.C: - return "C"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.SwitchIsSupported_string_with_comparison_method -var _ = (Func)((string string_0) => //string -{ - switch (string_0) - { - case "a": - return "A"; - case "b": - return "B"; - default: - return "C"; - } -}); - -//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_to_nullable_cases -var _ = (Func)((MyEnum? myEnum__0) => //string -{ - switch (myEnum__0) - { - case (MyEnum?)MyEnum.A: - return "A"; - case (MyEnum?)MyEnum.B: - return "B"; - case (MyEnum?)MyEnum.C: - return "C"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.SwitchIsSupported_bool_value -var _ = (Func)((bool bool_0) => //string -{ - switch (bool_0) - { - case true: - return "A"; - case false: - return "B"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.SwitchIsSupported1 -var _ = (Func)((int int_0) => //string -{ - switch (int_0) - { - case 1: - return "A"; - case 2: - return "B"; - case 5: - return "C"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.SwitchIsSupported31 -var _ = (Func)((int int_0) => //string -{ - switch (int_0) - { - case 1: - return "A"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.SwitchIsSupported_string -var _ = (Func)((string string_0) => //string -{ - switch (string_0) - { - case "A": - return "A"; - case "B": - return "B"; - default: - return "C"; - } -}); - -//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_via_comparison_method_with_non_nullable_parameters -var _ = (Func)((MyEnum? myEnum__0) => //string -{ - switch (myEnum__0) - { - case (MyEnum?)MyEnum.A: - return "A"; - case (MyEnum?)MyEnum.B: - return "B"; - case (MyEnum?)MyEnum.C: - return "C"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_to_non_nullable_cases_via_comparison_method_Impossible_both_should_be_nullable -var _ = (Func)((MyEnum? myEnum__0) => //string -{ - switch (myEnum__0) - { - case (MyEnum?)MyEnum.A: - return "A"; - case (MyEnum?)MyEnum.B: - return "B"; - case (MyEnum?)MyEnum.C: - return "C"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.SwitchIsSupported_string_with_comparison_method -var _ = (Func)((string string_0) => //string -{ - switch (string_0) - { - case "a": - return "A"; - case "b": - return "B"; - default: - return "C"; - } -}); - -//Issue127_Switch_is_supported.Switch_nullable_enum_value_equals_to_nullable_cases -var _ = (Func)((MyEnum? myEnum__0) => //string -{ - switch (myEnum__0) - { - case (MyEnum?)MyEnum.A: - return "A"; - case (MyEnum?)MyEnum.B: - return "B"; - case (MyEnum?)MyEnum.C: - return "C"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.SwitchIsSupported_bool_value -var _ = (Func)((bool bool_0) => //string -{ - switch (bool_0) - { - case true: - return "A"; - case false: - return "B"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.SwitchIsSupported1 -var _ = (Func)((int int_0) => //string -{ - switch (int_0) - { - case 1: - return "A"; - case 2: - return "B"; - case 5: - return "C"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.SwitchIsSupported31 -var _ = (Func)((int int_0) => //string -{ - switch (int_0) - { - case 1: - return "A"; - default: - return "Z"; - } -}); - -//Issue127_Switch_is_supported.SwitchIsSupported_string -var _ = (Func)((string string_0) => //string -{ - switch (string_0) - { - case "A": - return "A"; - case "B": - return "B"; - default: - return "C"; - } -}); - -//Issue156_InvokeAction.InvokeActionConstantIsSupported -var _ = (Action)(() => //void -{ - (default(Action)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( - (object)4, - (object)2); -}); - -//HoistedLambdaExprTests.Should_compile_nested_lambda -var _ = (Func)(() => //X - X.Get( - (Func)((A it) => //X - new X(it)), - new Lazy((Func)(() => //A - default(c__DisplayClass1_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.a)))); - -//Issue156_InvokeAction.InvokeFuncConstantIsSupported -var _ = (Func)(() => //string - (default(Func)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( - 4, - 2)); - -//HoistedLambdaExprTests.Should_compile_nested_lambda - -var _ = (Func)(() => //X - X.Get( - (Func)((A it) => //X - new X(it)), - new Lazy((Func)(() => //A - default(c__DisplayClass1_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.a)))); -//Issue156_InvokeAction.InvokeActionConstantIsSupported -var _ = (Action)(() => //void -{ - (default(Action)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( - (object)4, - (object)2); -}); - -//LoopTests.Loop_with_return -var _ = (Action)(() => //void -{ - int i = default; - while (true) - { - if (i > 3) - { - return; - } - ++i; - } - void_0:; -}); - - -//LoopTests.Loop_with_break -var _ = (Action)(() => //void -{ - while (true) - { - int i = default; - if (i > 3) - { - goto void_0; - } - ++i; - } - void_0:; -}); -//Issue156_InvokeAction.InvokeFuncConstantIsSupported -var _ = (Func)(() => //string - (default(Func)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( - 4, - 2)); - -//LoopTests.Loop_with_unused_break -var _ = (Action)(() => //void -{ - int i = default; - while (true) - { - if (i > 3) - { - return; - } - ++i; - } - void_0:; - void_1:; -}); - -//LoopTests.Loop_with_break_and_continue -var _ = (Action)(() => //void -{ - int i = default; - int j = default; - while (true) - { - void_0:; - if (j == 0) - { - ++j; - goto void_0; - } - if (i > 3) - { - goto void_1; - } - ++i; - } - void_1:; -}); - - -//LoopTests.Loop_with_unused_continue -//Issue159_NumericConversions.FloatToDecimalNullableShouldWork -var _ = (Action)(() => //void -{ - int i = default; - while (true) - { - void_0:; - if (i > 3) - { - goto void_1; - } - ++i; - } - void_1:; -}); -var _ = (Func, ValueHolder>)((ValueHolder floatValue) => //ValueHolder -{ - ValueHolder nullableDecimal = null; - nullableDecimal = new ValueHolder(); - nullableDecimal.Value = (Decimal?)floatValue.Value; - return nullableDecimal; -}); - -//LoopTests.Loop_with_unused_break_and_continue -var _ = (Action)(() => //void -{ - int i = default; - while (true) - { - void_0:; - if (i > 3) - { - return; - } - ++i; - } - void_1:; - void_2:; -}); - -//LoopTests.Loop_with_return_value -var _ = (Func)(() => //int -{ - int i = default; - while (true) - { - i = 4; - if (i > 3) - { - return 5; - } - } - int_0:; -}); - -//LoopTests.Loop_with_return -var _ = (Action)(() => //void -{ - int i = default; - while (true) - { - if (i > 3) - { - return; - } - ++i; - } - void_0:; -}); - -//LoopTests.Loop_with_break -var _ = (Action)(() => //void -{ - while (true) - { - int i = default; - if (i > 3) - { - goto void_0; - } - ++i; - } - void_0:; -}); - -//LoopTests.Loop_with_unused_break -var _ = (Action)(() => //void -{ - int i = default; - while (true) - { - if (i > 3) - { - return; - } - ++i; - } - void_0:; - void_1:; -}); - -//LoopTests.Loop_with_break_and_continue -var _ = (Action)(() => //void -{ - int i = default; - int j = default; - while (true) - { - void_0:; - if (j == 0) - { - ++j; - goto void_0; - } - if (i > 3) - { - goto void_1; - } - ++i; - } - void_1:; -}); - -//LoopTests.Loop_with_unused_continue -var _ = (Action)(() => //void -{ - int i = default; - while (true) - { - void_0:; - if (i > 3) - { - goto void_1; - } - ++i; - } - void_1:; -}); - -//LoopTests.Loop_with_unused_break_and_continue -var _ = (Action)(() => //void -{ - int i = default; - while (true) - { - void_0:; - if (i > 3) - { - return; - } - ++i; - } - void_1:; - void_2:; -}); - -//LoopTests.Loop_with_return_value -var _ = (Func)(() => //int -{ - int i = default; - while (true) - { - i = 4; - if (i > 3) - { - return 5; - } - } - int_0:; -}); - -//ListInitTests.Simple_ListInit_works -var _ = (Func>)((ListInitTests obj) => //IEnumerable - new List() - { - new PropertyValue( - "Id", - obj.Id, - default(ClassProperty)/*NOTE: Provide the non-default value for the Constant!*/), - new PropertyValue( - "Property1", - obj.Property1, - default(ClassProperty)/*NOTE: Provide the non-default value for the Constant!*/) - }); - -//ListInitTests.Simple_ListInit_works - -//Issue159_NumericConversions.ConvertNullableFloatToDecimal -var _ = (Func)((float? f) => //Decimal? - (Decimal?)f); -var _ = (Func>)((ListInitTests obj) => //IEnumerable - new List() - { - new PropertyValue( - "Id", - obj.Id, - default(ClassProperty)/*NOTE: Provide the non-default value for the Constant!*/), - new PropertyValue( - "Property1", - obj.Property1, - default(ClassProperty)/*NOTE: Provide the non-default value for the Constant!*/) - }); - -//NestedLambdaTests.Issue401_What_happens_if_inlined_invocation_of_lambda_overrides_the_same_parameter -var _ = (Func)((int int_0) => //int -{ - int_0 = 42; - ((Action)((int int_0) => //void - { - int_0 = int_0 - 2; - })) - .Invoke( - int_0); - return int_0; -}); - -//NestedLambdaTests.Hmm_I_can_use_the_same_parameter_for_outer_and_nested_lambda -var _ = (Func)(() => //int - ((Func)((int n) => //int - n - ((Func)((int n) => //int - n + 1)) - .Invoke( - n))) - .Invoke( - 42) + ((Func)((int n) => //int - n + 1)) - .Invoke( - 13)); - -//NestedLambdaTests.Using_try_finally_as_arithmetic_operand_use_void_block_in_finally -T __f(System.Func f) => f(); -var _ = (Func)((int n) => //int - n - - __f(() => { - int nSaved = default; - try - { - nSaved = n; - return n + 10; - } - finally - { - n = nSaved; - } - })); - -//NestedLambdaTests.Using_try_finally_as_arithmetic_operand -T __f(System.Func f) => f(); -var _ = (Func)((int n) => //int - n - - __f(() => { - int nSaved = default; - try - { - nSaved = n; - return n + 10; - } - finally - { - n = nSaved; - } - })); - -//Issue159_NumericConversions.FloatToDecimalNullableShouldWork -var _ = (Func, ValueHolder>)((ValueHolder floatValue) => //ValueHolder -{ - ValueHolder nullableDecimal = null; - nullableDecimal = new ValueHolder(); - nullableDecimal.Value = (Decimal?)floatValue.Value; - return nullableDecimal; -}); - -//Issue159_NumericConversions.ConvertNullableFloatToDecimal -var _ = (Func)((float? f) => //Decimal? - (Decimal?)f); - -//NestedLambdaTests.Issue401_What_happens_if_inlined_invocation_of_lambda_overrides_the_same_parameter -var _ = (Func)((int int_0) => //int -{ - int_0 = 42; - ((Action)((int int_0) => //void - { - int_0 = int_0 - 2; - })) - .Invoke( - int_0); - return int_0; -}); - -//NestedLambdaTests.Hmm_I_can_use_the_same_parameter_for_outer_and_nested_lambda -var _ = (Func)(() => //int - ((Func)((int n) => //int - n - ((Func)((int n) => //int - n + 1)) - .Invoke( - n))) - .Invoke( - 42) + ((Func)((int n) => //int - n + 1)) - .Invoke( - 13)); - -//NestedLambdaTests.Using_try_finally_as_arithmetic_operand_use_void_block_in_finally -T __f(System.Func f) => f(); -var _ = (Func)((int n) => //int - n - - __f(() => { - int nSaved = default; - try - { - nSaved = n; - return n + 10; - } - finally - { - n = nSaved; - } - })); - -//NestedLambdaTests.Using_try_finally_as_arithmetic_operand -T __f(System.Func f) => f(); -var _ = (Func)((int n) => //int - n - - __f(() => { - int nSaved = default; - try - { - nSaved = n; - return n + 10; - } - finally - { - n = nSaved; - } - })); - -//Issue170_Serializer_Person_Ref.InvokeActionConstantIsSupported -var _ = (DeserializeDelegate)(( - byte[] buffer, - ref int offset, - ref Person @value) => //void -{ - @value.Health = 5; - @value.Name = "test result name"; -}); - -//Issue170_Serializer_Person_Ref.InvokeActionConstantIsSupportedSimpleClass_AddAssign -var _ = (DeserializeDelegateSimple)((ref SimplePersonClass @value) => //void -{ - @value.Health += 5; -}); - -//Issue170_Serializer_Person_Ref.InvokeActionConstantIsSupported -var _ = (DeserializeDelegate)(( - byte[] buffer, - ref int offset, - ref Person @value) => //void -{ - @value.Health = 5; - @value.Name = "test result name"; -}); - -//Issue170_Serializer_Person_Ref.InvokeActionConstantIsSupportedSimpleClass_AddAssign -var _ = (DeserializeDelegateSimple)((ref SimplePersonClass @value) => //void -{ - @value.Health += 5; -}); - -//Issue181_TryEmitIncDecAssign_InvalidCastException.TryEmitIncDecAssign_Supports_PostIncrement_Property_Action - -//TryCatchTests.Can_return_nested_catch_block_result -var _ = (Action)((Issue181_TryEmitIncDecAssign_InvalidCastException issue181_TryEmitIncDecAssign_InvalidCastException_0) => //void -{ - issue181_TryEmitIncDecAssign_InvalidCastException_0.CounterProperty++; -}); -var _ = (Func)(() => //string -{ - try - { - try - { - throw new Exception(); - } - catch (Exception) - { - return "From inner Catch block"; - } - string_0:; - } - catch (Exception) - { - return "From outer Catch block"; - } - string_1:; -}); - -//TryCatchTests.Can_handle_the_exception_and_return_result_from_TryCatch_block -var _ = (Func)((string a) => //int -{ - try - { - return int.Parse(a); - } - catch (Exception ex) - { - return (ex.Message.Length > 0) ? 47 : 0; - } -}); - -//TryCatchTests.Issue424_Can_be_nested_in_call_expression - -T __f(System.Func f) => f(); -var _ = (Func, Func, Func, string>)(( - Func pa, - Func pb, - Func pc) => //string - TryCatchTests.TestMethod( - __f(() => { - try - { - return pa.Invoke(); - } - catch (Exception ex) - { - return ex.Message; - } - }), - __f(() => { - try - { - return pb.Invoke(); - } - catch (Exception ex) - { - return ex.Message; - } - }), - __f(() => { - try - { - return pc.Invoke(); - } - catch (Exception ex) - { - return ex.Message; - } - }))); -//Issue181_TryEmitIncDecAssign_InvalidCastException.TryEmitIncDecAssign_Supports_PostIncrement_Property_Action -var _ = (Action)((Issue181_TryEmitIncDecAssign_InvalidCastException issue181_TryEmitIncDecAssign_InvalidCastException_0) => //void -{ - issue181_TryEmitIncDecAssign_InvalidCastException_0.CounterProperty++; -}); - -//TryCatchTests.Can_be_nested_in_binary -T __f(System.Func f) => f(); -var _ = (Func, int>)((Func p) => //int - 1 + - __f(() => { - try - { - return p.Invoke(); - } - catch (Exception) - { - return 0; - } - })); - -//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Test_the_tmp_var_block_reduction -T __f(System.Func f) => f(); -var _ = (Func)(( - Source src, - Dest dst) => //Dest - (src == null) ? (Dest)null : - __f(() => { - dst = dst ?? new Dest(); - dst.Value = src.Value; - return dst; - })); - -//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Coalesce_should_work_with_throw -var _ = (Func)(( - Source src, - Dest dst) => //Dest - (src == null) ? (Dest)null : - dst ?? throw default(ArgumentNullException)/*NOTE: Provide the non-default value for the Constant!*/); - -//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Coalesce_should_produce_optimal_opcodes -var _ = (Func)((Source source) => //Dest - (source == null) ? (Dest)null : - default(Dest)/*NOTE: Provide the non-default value for the Constant!*/ ?? new Dest() - { - Value = source.Value - }); - -//TryCatchTests.Can_return_from_catch_block -var _ = (Func)(() => //bool -{ - try - { - throw default(DivideByZeroException)/*NOTE: Provide the non-default value for the Constant!*/; - return false; - } - catch (DivideByZeroException) - { - return true; - } -}); - -//TryCatchTests.Can_return_with_return_goto_from_the_catch_block -var _ = (Func)(() => //bool -{ - try - { - throw default(DivideByZeroException)/*NOTE: Provide the non-default value for the Constant!*/; - return false; - } - catch (DivideByZeroException) - { - return true; - } -}); - -//TryCatchTests.Can_return_from_try_block_using_label -var _ = (Func)(() => //string -{ - try - { - return "From Try block"; - } - catch (Exception) - { - return "From Catch block"; - } - string_0:; -}); - -//TryCatchTests.Can_return_from_catch_block_using_label -var _ = (Func)(() => //string -{ - try - { - throw new Exception(); - } - catch (Exception) - { - return "From Catch block"; - } - string_0:; -}); - -//TryCatchTests.Can_return_try_block_result_using_label_from_the_inner_try -var _ = (Func)(() => //string -{ - try - { - try - { - return "From inner Try block"; - } - catch (Exception) - { - return "From inner Catch block"; - } - string_0:; - } - catch (Exception) - { - return "From outer Catch block"; - } - string_1:; -}); - -//TryCatchTests.Can_return_from_try_block_using_goto_to_label_with_default_value -var _ = (Func)(() => //string -{ - string s = null; - try - { - return "From Try block"; - } - catch (Exception) - { - return "From Catch block"; - } - string_0:; - return s; -}); - -//TryCatchTests.Can_return_from_try_block_using_goto_to_label_with_the_more_code_after_label -var _ = (Func)(() => //string -{ - string s = null; - try - { - return "From Try block"; - } - catch (Exception) - { - return "From Catch block"; - } - void_0:; - s = "the end"; - return s; -}); - -//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Test_the_tmp_var_block_reduction -T __f(System.Func f) => f(); -var _ = (Func)(( - Source src, - Dest dst) => //Dest - (src == null) ? (Dest)null : - __f(() => { - dst = dst ?? new Dest(); - dst.Value = src.Value; - return dst; - })); - -//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Coalesce_should_work_with_throw -var _ = (Func)(( - Source src, - Dest dst) => //Dest - (src == null) ? (Dest)null : - dst ?? throw default(ArgumentNullException)/*NOTE: Provide the non-default value for the Constant!*/); - -//Issue196_AutoMapper_tests_are_failing_when_using_FEC.Coalesce_should_produce_optimal_opcodes -var _ = (Func)((Source source) => //Dest - (source == null) ? (Dest)null : - default(Dest)/*NOTE: Provide the non-default value for the Constant!*/ ?? new Dest() - { - Value = source.Value - }); - -//TryCatchTests.Can_return_nested_catch_block_result -var _ = (Func)(() => //string -{ - try - { - try - { - throw new Exception(); - } - catch (Exception) - { - return "From inner Catch block"; - } - string_0:; - } - catch (Exception) - { - return "From outer Catch block"; - } - string_1:; -}); - -//TryCatchTests.Can_handle_the_exception_and_return_result_from_TryCatch_block -var _ = (Func)((string a) => //int -{ - try - { - return int.Parse(a); - } - catch (Exception ex) - { - return (ex.Message.Length > 0) ? 47 : 0; - } -}); - -//TryCatchTests.Issue424_Can_be_nested_in_call_expression -T __f(System.Func f) => f(); -var _ = (Func, Func, Func, string>)(( - Func pa, - Func pb, - Func pc) => //string - TryCatchTests.TestMethod( - __f(() => { - try - { - return pa.Invoke(); - } - catch (Exception ex) - { - return ex.Message; - } - }), - __f(() => { - try - { - return pb.Invoke(); - } - catch (Exception ex) - { - return ex.Message; - } - }), - __f(() => { - try - { - return pc.Invoke(); - } - catch (Exception ex) - { - return ex.Message; - } - }))); - -//TryCatchTests.Can_be_nested_in_binary -T __f(System.Func f) => f(); -var _ = (Func, int>)((Func p) => //int - 1 + - __f(() => { - try - { - return p.Invoke(); - } - catch (Exception) - { - return 0; - } - })); - -//Issue204_Operation_could_destabilize_the_runtime__AutoMapper.ShouldAlsoWork -var _ = (Func)((OrderWithNullableStatus src) => //OrderDtoWithNullableStatus -{ - OrderDtoWithNullableStatus dest = null; - Status? resolvedValue = null; - Status? propertyValue = null; - dest = new OrderDtoWithNullableStatus(); - resolvedValue = src.Status; - propertyValue = (resolvedValue == null) ? (Status?)null : - (Status?)resolvedValue.Value; - dest.Status = propertyValue; - return dest; -}); - -//TryCatchTests.Can_return_from_catch_block -var _ = (Func)(() => //bool -{ - try - { - throw default(DivideByZeroException)/*NOTE: Provide the non-default value for the Constant!*/; - return false; - } - catch (DivideByZeroException) - { - return true; - } -}); - -//Issue204_Operation_could_destabilize_the_runtime__AutoMapper.ShouldAlsoWork -var _ = (Func)((OrderWithNullableStatus src) => //OrderDtoWithNullableStatus -{ - OrderDtoWithNullableStatus dest = null; - Status? resolvedValue = null; - Status? propertyValue = null; - dest = new OrderDtoWithNullableStatus(); - resolvedValue = src.Status; - propertyValue = (resolvedValue == null) ? (Status?)null : - (Status?)resolvedValue.Value; - dest.Status = propertyValue; - return dest; -}); - -//TryCatchTests.Can_return_with_return_goto_from_the_catch_block -var _ = (Func)(() => //bool -{ - try - { - throw default(DivideByZeroException)/*NOTE: Provide the non-default value for the Constant!*/; - return false; - } - catch (DivideByZeroException) - { - return true; - } -}); - -//TryCatchTests.Can_return_from_try_block_using_label -var _ = (Func)(() => //string -{ - try - { - return "From Try block"; - } - catch (Exception) - { - return "From Catch block"; - } - string_0:; -}); - -//TryCatchTests.Can_return_from_catch_block_using_label -var _ = (Func)(() => //string -{ - try - { - throw new Exception(); - } - catch (Exception) - { - return "From Catch block"; - } - string_0:; -}); - -//TryCatchTests.Can_return_try_block_result_using_label_from_the_inner_try -var _ = (Func)(() => //string -{ - try - { - try - { - return "From inner Try block"; - } - catch (Exception) - { - return "From inner Catch block"; - } - string_0:; - } - catch (Exception) - { - return "From outer Catch block"; - } - string_1:; -}); - -//TryCatchTests.Can_return_from_try_block_using_goto_to_label_with_default_value -var _ = (Func)(() => //string -{ - string s = null; - try - { - return "From Try block"; - } - catch (Exception) - { - return "From Catch block"; - } - string_0:; - return s; -}); - -//TryCatchTests.Can_return_from_try_block_using_goto_to_label_with_the_more_code_after_label - -//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Static_Value_Method -var _ = (Func)(() => //string -{ - string s = null; - try - { - return "From Try block"; - } - catch (Exception) - { - return "From Catch block"; - } - void_0:; - s = "the end"; - return s; -}); -var _ = (RefDelegate)((ref string string_0) => //string - Issue243_Pass_Parameter_By_Ref_is_supported.PassByValue(string_0)); - -//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Instance_Value_Method -var _ = (RefInstanceDelegate)(( - ref PassedByRefClass passedByRefClass_0, - ref string string_1) => //string - passedByRefClass_0.PassByValue(string_1)); - -//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Struct_Instance_Value_Method -var _ = (RefInstanceDelegate)(( - ref PassedByRefStruct passedByRefStruct_0, - ref int int_1) => //string - passedByRefStruct_0.PassByValue(int_1)); - -//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Static_Value_Method -var _ = (RefDelegate)((ref string string_0) => //string - Issue243_Pass_Parameter_By_Ref_is_supported.PassByValue(string_0)); - -//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Instance_Value_Method -var _ = (RefInstanceDelegate)(( - ref PassedByRefClass passedByRefClass_0, - ref string string_1) => //string - passedByRefClass_0.PassByValue(string_1)); - -//Issue243_Pass_Parameter_By_Ref_is_supported.Lambda_Ref_Parameter_Passed_Into_Struct_Instance_Value_Method -var _ = (RefInstanceDelegate)(( - ref PassedByRefStruct passedByRefStruct_0, - ref int int_1) => //string - passedByRefStruct_0.PassByValue(int_1)); - -//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions -var _ = (Func)(() => //A - new A( - ((B)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 0, - (Func)(() => //B - new B( - ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //C - new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))), - ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))), - ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //C - new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))))); - -//UnaryExpressionTests.PostDecrementAssign_compiles -var _ = (Func)((int i) => //int - i--); - -//UnaryExpressionTests.ArrayOfStructParameter_MemberPostDecrementAssign_works -var _ = (Func)(( - UnaryExpressionTests.X[] a, - int i) => //int - a[i].N--); - -//UnaryExpressionTests.ArrayOfStructParameter_MemberPreDecrementAssign_works -var _ = (Func)(( - UnaryExpressionTests.X[] a, - int i) => //int - --a[i].N); - -//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions_with_3_dublicate_D -var _ = (Func)(() => //A1 - new A1( - ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))), - ((B)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 0, - (Func)(() => //B - new B( - ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //C - new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))), - ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))), - ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //C - new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))))); - -//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions_with_non_passed_params_in_closure -var _ = (Func)(( - Name d1Name, - Name c1Name, - Name b1Name) => //A2 - new A2( - ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 2, - (Func)(() => //D1 - new D1(d1Name)))), - ((C1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 1, - (Func)(() => //C1 - new C1( - ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 2, - (Func)(() => //D1 - new D1(d1Name)))), - c1Name)))), - ((B1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 0, - (Func)(() => //B1 - new B1( - ((C1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 1, - (Func)(() => //C1 - new C1( - ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 2, - (Func)(() => //D1 - new D1(d1Name)))), - c1Name)))), - b1Name, - ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 2, - (Func)(() => //D1 - new D1(d1Name)))))))))); - -//Nested_lambdas_assigned_to_vars.Test_2_shared_lambdas_on_the_same_level -var _ = (Func
)(() => //DD - new DD( - ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))), - ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))); - -//Issue252_Bad_code_gen_for_comparison_of_nullable_type_to_null.Equal_in_void_Handler_should_work -var _ = (Handler)((int? param) => //void -{ - if (param == (int?)null) - { - _ = ((int?)null).ToString(); - }; -}); - -//Issue252_Bad_code_gen_for_comparison_of_nullable_type_to_null.Not_equal_in_void_Handler_should_work -var _ = (Handler)((int? param) => //void -{ - if (!(param == (int?)null)) - { - _ = param.ToString(); - }; -}); - -//Issue252_Bad_code_gen_for_comparison_of_nullable_type_to_null.Equal_in_void_Handler_should_work -var _ = (Handler)((int? param) => //void -{ - if (param == (int?)null) - { - _ = ((int?)null).ToString(); - }; -}); - -//UnaryExpressionTests.Parameter_PostIncrementAssign_compiles - -//Issue252_Bad_code_gen_for_comparison_of_nullable_type_to_null.Not_equal_in_void_Handler_should_work -var _ = (Func)((int i) => //int - i++); -var _ = (Handler)((int? param) => //void -{ - if (!(param == (int?)null)) - { - _ = param.ToString(); - }; -}); - -//UnaryExpressionTests.RefParameter_PostIncrementAssign_works -var _ = (FuncByRef)((ref int i) => //int - i++); - -//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_1 -var _ = (SerializerDelegate)(( - ISerializer serializer, - ref Test data) => //void -{ - serializer.WriteDecimal(in data.Field1); -}); - -//UnaryExpressionTests.ArrayParameter_PostIncrementAssign_works -var _ = (Func)(( - int[] a, - int i) => //int - a[i]++); - -//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_2 -var _ = (SerializerDelegate)(( - ISerializer serializer, - ref Test data) => //void -{ - serializer.WriteDecimal(in data.NestedTest.Field1); -}); - -//UnaryExpressionTests.ArrayParameterByRef_PostIncrementAssign_works -var _ = (FuncArrByRef)(( - ref int[] a, - int i) => //int - a[i]++); - -//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_3 -var _ = (SerializerDelegate)(( - ISerializer serializer, - ref Test data) => //void -{ - serializer.WriteDecimalByVal(data.Field1); -}); - -//UnaryExpressionTests.ArrayItemRefParameter_PostIncrementAssign_works -var _ = (FuncByRef)((ref int i) => //int - i++); - -//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_4 -var _ = (SerializerDelegate)(( - ISerializer serializer, - ref Test data) => //void -{ - serializer.WriteDecimalTwoArgs( - in data.Field1, - (new Klaz( - true, - (float)0.3)).KlazField); -}); - -//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_1 -var _ = (SerializerDelegate)(( - ISerializer serializer, - ref Test data) => //void -{ - serializer.WriteDecimal(in data.Field1); -}); - -//UnaryExpressionTests.PostDecrementAssign_compiles -var _ = (Func)((int i) => //int - i--); - -//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_2 -var _ = (SerializerDelegate)(( - ISerializer serializer, - ref Test data) => //void -{ - serializer.WriteDecimal(in data.NestedTest.Field1); -}); - -//UnaryExpressionTests.ArrayOfStructParameter_MemberPostDecrementAssign_works -var _ = (Func)(( - UnaryExpressionTests.X[] a, - int i) => //int - a[i].N--); - -//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_3 -var _ = (SerializerDelegate)(( - ISerializer serializer, - ref Test data) => //void -{ - serializer.WriteDecimalByVal(data.Field1); -}); - -//Issue248_Calling_method_with_in_out_parameters_in_expression_lead_to_NullReferenceException_on_calling_site.Test_4 - -var _ = (SerializerDelegate)(( - ISerializer serializer, - ref Test data) => //void -{ - serializer.WriteDecimalTwoArgs( - in data.Field1, - (new Klaz( - true, - (float)0.3)).KlazField); -}); -//UnaryExpressionTests.ArrayOfStructParameter_MemberPreDecrementAssign_works -var _ = (Func)(( - UnaryExpressionTests.X[] a, - int i) => //int - --a[i].N); - -//Issue251_Bad_code_gen_for_byRef_parameters.Test_1 -var _ = (EqualsHandler)(( - in double leftValue, - in double rightValue) => //bool - leftValue.Equals(rightValue)); - -//Issue251_Bad_code_gen_for_byRef_parameters.Test_1 -var _ = (EqualsHandler)(( - in double leftValue, - in double rightValue) => //bool - leftValue.Equals(rightValue)); - -//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Should_Deserialize_Simple -var _ = (DeserializerDlg)(( - ref ReadOnlySequence input, - Word @value, - out long bytesRead) => //bool -{ - SequenceReader reader = default; - string wordValue = null; - reader = new SequenceReader(input); - if (ReaderExtensions.TryReadValue( - ref reader, - out wordValue) == false) - { - bytesRead = reader.Consumed; - return false; - } - @value.Value = wordValue; - bytesRead = reader.Consumed; - return true; -}); - -//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Should_Deserialize_Simple -var _ = (DeserializerDlg)(( - ref ReadOnlySequence input, - Simple @value, - out long bytesRead) => //bool -{ - SequenceReader reader = default; - int identifier = default; - Word[] content = null; - byte contentLength = default; - reader = new SequenceReader(input); - if (ReaderExtensions.TryReadValue( - ref reader, - out identifier) == false) - { - bytesRead = reader.Consumed; - return false; - } - if (ReaderExtensions.TryReadValue( - ref reader, - out contentLength) == false) - { - bytesRead = reader.Consumed; - return false; - } - if (Serializer.TryDeserializeValues( - ref reader, - (int)contentLength, - out content) == false) - { - bytesRead = reader.Consumed; - return false; - } - @value.Identifier = identifier; - @value.Sentence = content; - bytesRead = reader.Consumed; - return true; -}); - -//UnaryExpressionTests.Parameter_PostIncrementAssign_compiles -var _ = (Func)((int i) => //int - i++); - -//UnaryExpressionTests.RefParameter_PostIncrementAssign_works -var _ = (FuncByRef)((ref int i) => //int - i++); - -//UnaryExpressionTests.ArrayParameter_PostIncrementAssign_works -var _ = (Func)(( - int[] a, - int i) => //int - a[i]++); - -//UnaryExpressionTests.ArrayParameterByRef_PostIncrementAssign_works -var _ = (FuncArrByRef)(( - ref int[] a, - int i) => //int - a[i]++); - -//UnaryExpressionTests.ArrayItemRefParameter_PostIncrementAssign_works -var _ = (FuncByRef)((ref int i) => //int - i++); - -//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Try_compare_strings -var _ = (Func)((string s) => //string -{ - if (s == "42") - { - return "true"; - } - return "false"; -}); - -//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Conditional_with_Equal_true_should_shortcircuit_to_Brtrue_or_Brfalse -var _ = (Func)((bool b) => //string -{ - if (b) - { - return "true"; - } - return "false"; -}); - -//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Should_Deserialize_Simple -var _ = (DeserializerDlg)(( - ref ReadOnlySequence input, - Word @value, - out long bytesRead) => //bool -{ - SequenceReader reader = default; - string wordValue = null; - reader = new SequenceReader(input); - if (ReaderExtensions.TryReadValue( - ref reader, - out wordValue) == false) - { - bytesRead = reader.Consumed; - return false; - } - @value.Value = wordValue; - bytesRead = reader.Consumed; - return true; -}); - -//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Should_Deserialize_Simple -var _ = (DeserializerDlg)(( - ref ReadOnlySequence input, - Simple @value, - out long bytesRead) => //bool -{ - SequenceReader reader = default; - int identifier = default; - Word[] content = null; - byte contentLength = default; - reader = new SequenceReader(input); - if (ReaderExtensions.TryReadValue( - ref reader, - out identifier) == false) - { - bytesRead = reader.Consumed; - return false; - } - if (ReaderExtensions.TryReadValue( - ref reader, - out contentLength) == false) - { - bytesRead = reader.Consumed; - return false; - } - if (Serializer.TryDeserializeValues( - ref reader, - (int)contentLength, - out content) == false) - { - bytesRead = reader.Consumed; - return false; - } - @value.Identifier = identifier; - @value.Sentence = content; - bytesRead = reader.Consumed; - return true; -}); - -//TestTools.C:\dev\FastExpressionCompiler\test\FastExpressionCompiler.LightExpression.UnitTests\NestedLambdasSharedToExpressionCodeStringTest.cs -var Issue478_Debug_info_should_be_included_into_nested_lambdas = (Func)(() => //A - new A( - ((B)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 0, - (Func)(() => //object - new B( - ((C)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //object - new C(((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //object - new D()))))))), - ((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //object - new D()))))))), - ((C)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //object - new C(((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //object - new D()))))))))); - -//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Try_compare_strings -var _ = (Func)((string s) => //string -{ - if (s == "42") - { - return "true"; - } - return "false"; -}); - -//Issue237_Trying_to_implement_For_Foreach_loop_but_getting_an_InvalidProgramException_thrown.Conditional_with_Equal_true_should_shortcircuit_to_Brtrue_or_Brfalse -var _ = (Func)((bool b) => //string -{ - if (b) - { - return "true"; - } - return "false"; -}); - -//NestedLambdasSharedToExpressionCodeStringTest.Should_output_a_valid_expression_code -var _ = (Func)(() => //A - new A( - ((B)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 0, - (Func)(() => //object - new B( - ((C)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //object - new C(((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //object - new D()))))))), - ((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //object - new D()))))))), - ((C)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //object - new C(((D)default(NestedLambdasSharedToExpressionCodeStringTest)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //object - new D()))))))))); - -// UnitTests are passing in 400 ms. - -//Issue261_Loop_wih_conditions_fails.Test_serialization_of_the_Dictionary -var _ = (WriteSealed)(( - Dictionary source, - ref BufferedStream stream, - Binary io) => //void -{ - stream.ReserveSize(16); - stream.Write(source._count); - stream.Write(source._freeCount); - stream.Write(source._freeList); - stream.Write(source._version); - int[] tempResult = null; - tempResult = source._buckets; - stream.ReserveSize(1); - if (tempResult == null) - { - stream.Write((byte)0); - goto afterWrite; - } - else - { - stream.Write((byte)1); - } - int length0 = default; - stream.ReserveSize(4); - length0 = tempResult.GetLength(0); - stream.Write(length0); - if (0 == length0) - { - goto skipWrite; - } - io.WriteValuesArray1( - tempResult, - 4); - skipWrite:; - afterWrite:; - finishWrite:; - io.WriteInternal(source._comparer); - Dictionary.Entry[] tempResult_1 = null; - tempResult_1 = source._entries; - stream.ReserveSize(1); - if (tempResult_1 == null) - { - stream.Write((byte)0); - goto afterWrite_1; - } - else - { - stream.Write((byte)1); - } - int length0_1 = default; - stream.ReserveSize(4); - length0_1 = tempResult_1.GetLength(0); - stream.Write(length0_1); - if (0 == length0_1) - { - goto skipWrite_1; - } - int i0 = default; - i0 = length0_1 - 1; - while (true) - { - if (i0 < 0) - { - goto break0; - } - else - { - stream.ReserveSize(8); - stream.Write(tempResult_1[i0].hashCode); - stream.Write(tempResult_1[i0].next); - stream.Write(tempResult_1[i0].key); - stream.Write(tempResult_1[i0].value); - finishWrite_1:; - continue0:; - i0 = i0 - 1; - } - } - break0:; - skipWrite_1:; - afterWrite_1:; - finishWrite_2:; - finishWrite_3:; -}); - -//Issue261_Loop_wih_conditions_fails.Serialize_the_nullable_decimal_array -var _ = (WriteSealed)(( - Nullable[] source, - ref BufferedStream stream, - Binary io) => //void -{ - int length0 = default; - stream.ReserveSize(4); - length0 = source.GetLength(0); - stream.Write(length0); - if (0 == length0) - { - goto skipWrite; - } - int i0 = default; - i0 = length0 - 1; - while (true) - { - if (i0 < 0) - { - goto break0; - } - else - { - stream.ReserveSize(17); - if (source[i0].HasValue) - { - stream.Write((byte)1); - stream.Write(source[i0].Value); - finishWrite:; - } - else - { - stream.Write((byte)0); - } - continue0:; - i0 = i0 - 1; - } - } - break0:; - skipWrite:; - finishWrite_1:; -}); - -//Issue261_Loop_wih_conditions_fails.Test_DictionaryTest_StringDictionary -var _ = (WriteSealed)(( - TestReadonly source, - ref BufferedStream stream, - Binary io) => //void -{ - stream.ReserveSize(4); - stream.Write(source.Value); - finishWrite:; -}); - -//Issue261_Loop_wih_conditions_fails.Test_the_big_re_engineering_test_from_the_Apex_Serializer_with_the_simple_mock_arguments -var _ = (Issue261_Loop_wih_conditions_fails.ReadMethods.ReadSealed)(( - ref Issue261_Loop_wih_conditions_fails.BufferedStream stream, - Issue261_Loop_wih_conditions_fails.Binary io) => //Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[] -{ - Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[] result = null; - int length0 = default; - stream.ReserveSize(4); - length0 = stream.Read(); - result = new Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[length0]; - io.LoadedObjectRefs.Add(result); - int index0 = default; - Issue261_Loop_wih_conditions_fails.ConstructorTests.Test tempResult = null; - index0 = length0 - 1; - while (true) - { - if (index0 < 0) - { - goto void_0; - } - else - { - // { The block result will be assigned to `result[index0]` - tempResult = (Issue261_Loop_wih_conditions_fails.ConstructorTests.Test)null; - stream.ReserveSize(5); - if (stream.Read() == (byte)0) - { - goto skipRead; - } - int refIndex = default; - refIndex = stream.Read(); - if (refIndex != -1) - { - tempResult = (Issue261_Loop_wih_conditions_fails.ConstructorTests.Test)io.LoadedObjectRefs[refIndex - 1]; - goto skipRead; - } - tempResult = new Issue261_Loop_wih_conditions_fails.ConstructorTests.Test(); - io.LoadedObjectRefs.Add(tempResult); - skipRead:; - result[index0] = tempResult; - // } end of block assignment - continue0:; - index0 = index0 - 1; - } - } - void_0:; - return result; -}); - -//Issue261_Loop_wih_conditions_fails.Test_assignment_with_the_block_on_the_right_side_with_just_a_constant -var _ = (Func)(() => //int -{ - int result = default; - // { The block result will be assigned to `result` - int temp = default; - temp = 42; - result = temp; - // } end of block assignment; - return result; -}); - -//Issue261_Loop_wih_conditions_fails.Test_assignment_with_the_block_on_the_right_side -var _ = (Func)(() => //int[] -{ - int[] result = null; - result = new int[1]; - // { The block result will be assigned to `result[0]` - int temp = default; - temp = 42; - result[0] = temp; - // } end of block assignment; - return result; -}); - -//Issue261_Loop_wih_conditions_fails.Test_class_items_array_index_via_variable_access_then_the_member_access -var _ = (Func)(( - Issue261_Loop_wih_conditions_fails.El[] elArr, - int index) => //string -{ - int tempIndex = default; - tempIndex = index; - return elArr[tempIndex].Message; -}); - -//Issue261_Loop_wih_conditions_fails.Test_serialization_of_the_Dictionary -var _ = (WriteSealed)(( - Dictionary source, - ref BufferedStream stream, - Binary io) => //void -{ - stream.ReserveSize(16); - stream.Write(source._count); - stream.Write(source._freeCount); - stream.Write(source._freeList); - stream.Write(source._version); - int[] tempResult = null; - tempResult = source._buckets; - stream.ReserveSize(1); - if (tempResult == null) - { - stream.Write((byte)0); - goto afterWrite; - } - else - { - stream.Write((byte)1); - } - int length0 = default; - stream.ReserveSize(4); - length0 = tempResult.GetLength(0); - stream.Write(length0); - if (0 == length0) - { - goto skipWrite; - } - io.WriteValuesArray1( - tempResult, - 4); - skipWrite:; - afterWrite:; - finishWrite:; - io.WriteInternal(source._comparer); - Dictionary.Entry[] tempResult_1 = null; - tempResult_1 = source._entries; - stream.ReserveSize(1); - if (tempResult_1 == null) - { - stream.Write((byte)0); - goto afterWrite_1; - } - else - { - stream.Write((byte)1); - } - int length0_1 = default; - stream.ReserveSize(4); - length0_1 = tempResult_1.GetLength(0); - stream.Write(length0_1); - if (0 == length0_1) - { - goto skipWrite_1; - } - int i0 = default; - i0 = length0_1 - 1; - while (true) - { - if (i0 < 0) - { - goto break0; - } - else - { - stream.ReserveSize(8); - stream.Write(tempResult_1[i0].hashCode); - stream.Write(tempResult_1[i0].next); - stream.Write(tempResult_1[i0].key); - stream.Write(tempResult_1[i0].value); - finishWrite_1:; - continue0:; - i0 = i0 - 1; - } - } - break0:; - skipWrite_1:; - afterWrite_1:; - finishWrite_2:; - finishWrite_3:; -}); - -//Issue261_Loop_wih_conditions_fails.Serialize_the_nullable_decimal_array -var _ = (WriteSealed)(( - Nullable[] source, - ref BufferedStream stream, - Binary io) => //void -{ - int length0 = default; - stream.ReserveSize(4); - length0 = source.GetLength(0); - stream.Write(length0); - if (0 == length0) - { - goto skipWrite; - } - int i0 = default; - i0 = length0 - 1; - while (true) - { - if (i0 < 0) - { - goto break0; - } - else - { - stream.ReserveSize(17); - if (source[i0].HasValue) - { - stream.Write((byte)1); - stream.Write(source[i0].Value); - finishWrite:; - } - else - { - stream.Write((byte)0); - } - continue0:; - i0 = i0 - 1; - } - } - break0:; - skipWrite:; - finishWrite_1:; -}); - -//Issue261_Loop_wih_conditions_fails.Serialize_the_nullable_decimal_array -var _ = (WriteSealed)(( - Nullable[] source, - ref BufferedStream stream, - Binary io) => //void -{ - int length0 = default; - stream.ReserveSize(4); - length0 = source.GetLength(0); - stream.Write(length0); - if (0 == length0) - { - goto skipWrite; - } - int i0 = default; - i0 = length0 - 1; - while (true) - { - if (i0 < 0) - { - goto break0; - } - else - { - stream.ReserveSize(17); - if (source[i0].HasValue) - { - stream.Write((byte)1); - stream.Write(source[i0].Value); - finishWrite:; - } - else - { - stream.Write((byte)0); - } - continue0:; - i0 = i0 - 1; - } - } - break0:; - skipWrite:; - finishWrite_1:; -}); - -//Issue261_Loop_wih_conditions_fails.Test_DictionaryTest_StringDictionary -var _ = (WriteSealed)(( - TestReadonly source, - ref BufferedStream stream, - Binary io) => //void -{ - stream.ReserveSize(4); - stream.Write(source.Value); - finishWrite:; -}); - -//Issue261_Loop_wih_conditions_fails.Test_the_big_re_engineering_test_from_the_Apex_Serializer_with_the_simple_mock_arguments -var _ = (Issue261_Loop_wih_conditions_fails.ReadMethods.ReadSealed)(( - ref Issue261_Loop_wih_conditions_fails.BufferedStream stream, - Issue261_Loop_wih_conditions_fails.Binary io) => //Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[] -{ - Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[] result = null; - int length0 = default; - stream.ReserveSize(4); - length0 = stream.Read(); - result = new Issue261_Loop_wih_conditions_fails.ConstructorTests.Test[length0]; - io.LoadedObjectRefs.Add(result); - int index0 = default; - Issue261_Loop_wih_conditions_fails.ConstructorTests.Test tempResult = null; - index0 = length0 - 1; - while (true) - { - if (index0 < 0) - { - goto void_0; - } - else - { - // { The block result will be assigned to `result[index0]` - tempResult = (Issue261_Loop_wih_conditions_fails.ConstructorTests.Test)null; - stream.ReserveSize(5); - if (stream.Read() == (byte)0) - { - goto skipRead; - } - int refIndex = default; - refIndex = stream.Read(); - if (refIndex != -1) - { - tempResult = (Issue261_Loop_wih_conditions_fails.ConstructorTests.Test)io.LoadedObjectRefs[refIndex - 1]; - goto skipRead; - } - tempResult = new Issue261_Loop_wih_conditions_fails.ConstructorTests.Test(); - io.LoadedObjectRefs.Add(tempResult); - skipRead:; - result[index0] = tempResult; - // } end of block assignment - continue0:; - index0 = index0 - 1; - } - } - void_0:; - return result; -}); - -//Issue261_Loop_wih_conditions_fails.Test_assignment_with_the_block_on_the_right_side_with_just_a_constant -var _ = (Func)(() => //int -{ - int result = default; - // { The block result will be assigned to `result` - int temp = default; - temp = 42; - result = temp; - // } end of block assignment; - return result; -}); - -//Issue261_Loop_wih_conditions_fails.Test_assignment_with_the_block_on_the_right_side -var _ = (Func)(() => //int[] -{ - int[] result = null; - result = new int[1]; - // { The block result will be assigned to `result[0]` - int temp = default; - temp = 42; - result[0] = temp; - // } end of block assignment; - return result; -}); - -//Issue261_Loop_wih_conditions_fails.Test_class_items_array_index_via_variable_access_then_the_member_access -var _ = (Func)(( - Issue261_Loop_wih_conditions_fails.El[] elArr, - int index) => //string -{ - int tempIndex = default; - tempIndex = index; - return elArr[tempIndex].Message; -}); - -//Issue261_Loop_wih_conditions_fails.Can_make_convert_and_compile_binary_equal_expression_of_different_types -var _ = (Func)(() => //bool - Issue261_Loop_wih_conditions_fails.GetByte() == (byte)0); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_case_2_Full_ExecutionEngineException -T __f(System.Func f) => f(); -var _ = (Func)((Enum15? p) => //int? - p.HasValue ? - __f(() => { - switch ((Enum15)p) - { - case Enum15.AA: - return (int?)10; - case Enum15.BB: - return (int?)20; - default: - return (int?)ConvertBuilder.ConvertDefault( - (object)(Enum15)p, - typeof(int?)); - } - }) : (int?)null); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_287_Case1_ConvertTests_NullableParameterInOperatorConvert_VerificationException -var _ = (Func)((Decimal p) => //CustomMoneyType - (CustomMoneyType)new Decimal?(p)); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_287_Case2_SimpleDelegate_as_nested_lambda_in_TesCollection_test -var _ = (Action)((SampleClass sampleClass_0) => //void -{ - sampleClass_0.add_SimpleDelegateEvent((SimpleDelegate)((string _) => //void - { - (default(SimpleDelegate)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( - _); - })); -}); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case6_MappingSchemaTests_CultureInfo_VerificationException -var _ = (Func)((DateTime v) => //string - v.ToString(default(c__DisplayClass41_0)/*NOTE: Provide the non-default value for the Constant!*/.info.DateTimeFormat)); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case5_ConvertTests_NullableIntToNullableEnum_NullReferenceException -var _ = (Func)((int? p) => //Enum1? - p.HasValue ? - (Enum1?)p.Value : (Enum1?)null); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case3_SecurityVerificationException -var _ = (Func)(( - SampleClass s, - int i) => //string - s.GetOther(i).OtherStrProp); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case2_NullRefException -var _ = (Func)(( - Expression expr, - IDataContext dctx, - object[] ps) => //object - (object)ConvertTo.From(((c__DisplayClass6_0)((ConstantExpression)((MemberExpression)((UnaryExpression)((MethodCallExpression)((LambdaExpression)((UnaryExpression)((MethodCallExpression)expr).Arguments.Item).Operand).Body).Arguments.Item).Operand).Expression).Value).flag)); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case2_Minimal_NullRefException -var _ = (Func)((object o) => //object - (object)((c__DisplayClass6_0)o).flag); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_case_4_simplified_InvalidCastException -var _ = (Func)(() => //SimpleDelegate - (SimpleDelegate)(new Delegate[]{null})[0]); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_case_4_Full_InvalidCastException -var _ = (Func)((object object_0) => //object -{ - SampleClass sampleClass_1 = null; - sampleClass_1 = new SampleClass( - object_0, - new Delegate[]{default(Func)/*NOTE: Provide the non-default value for the Constant!*/, default(Func)/*NOTE: Provide the non-default value for the Constant!*/, default(Action)/*NOTE: Provide the non-default value for the Constant!*/, default(SimpleDelegate)/*NOTE: Provide the non-default value for the Constant!*/, default(Func)/*NOTE: Provide the non-default value for the Constant!*/}); - (default(Action)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( - sampleClass_1); - return sampleClass_1; -}); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_case_3_Full_NullReferenceException -var _ = (Func>)(( - IQueryRunner qr, - IDataReader dr) => //IGrouping - ((Func>)(( - IQueryRunner qr_1, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps, - object[] preamble) => //IGrouping - { - SQLiteDataReader ldr = null; - ldr = (SQLiteDataReader)dr; - return GroupByHelper>.GetGrouping( - qr_1, - dctx, - rd, - default(List)/*NOTE: Provide the non-default value for the Constant!*/, - expr, - ps, - (Func)(( - IQueryRunner qr_1, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps) => //bool - ldr.IsDBNull(0) ? false : - (bool)ConvertBuilder.ConvertDefault( - (object)ldr.GetInt64(0), - typeof(bool))), - (Func>)null); - })) - .Invoke( - qr, - qr.DataContext, - dr, - qr.Expression, - qr.Parameters, - qr.Preambles)); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_case_1_Full_AccessViolationException -var _ = (Func>)(( - IQueryRunner qr, - IDataReader dr) => //f__AnonymousType142 - ((Func>)(( - IQueryRunner qr_1, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps, - object[] preamble) => //f__AnonymousType142 - { - SQLiteDataReader ldr = null; - f__AnonymousType142 f__AnonymousType142_int___0 = null; - ldr = (SQLiteDataReader)dr; - f__AnonymousType142_int___0 = new f__AnonymousType142((((ldr.IsDBNull(0) ? (int?)null : - new int?(ldr.GetInt32(0))) != (int?)null) ? - ldr.IsDBNull(0) ? (int?)null : - new int?(ldr.GetInt32(0)) : (int?)100)); - return f__AnonymousType142_int___0; - })) - .Invoke( - qr, - qr.DataContext, - dr, - qr.Expression, - qr.Parameters, - qr.Preambles)); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_case_2_Full_ExecutionEngineException -T __f(System.Func f) => f(); -var _ = (Func)((Enum15? p) => //int? - p.HasValue ? - __f(() => { - switch ((Enum15)p) - { - case Enum15.AA: - return (int?)10; - case Enum15.BB: - return (int?)20; - default: - return (int?)ConvertBuilder.ConvertDefault( - (object)(Enum15)p, - typeof(int?)); - } - }) : (int?)null); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_287_Case1_ConvertTests_NullableParameterInOperatorConvert_VerificationException -var _ = (Func)((Decimal p) => //CustomMoneyType - (CustomMoneyType)new Decimal?(p)); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_287_Case2_SimpleDelegate_as_nested_lambda_in_TesCollection_test -var _ = (Action)((SampleClass sampleClass_0) => //void -{ - sampleClass_0.add_SimpleDelegateEvent((SimpleDelegate)((string _) => //void - { - (default(SimpleDelegate)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( - _); - })); -}); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case6_MappingSchemaTests_CultureInfo_VerificationException -var _ = (Func)((DateTime v) => //string - v.ToString(default(c__DisplayClass41_0)/*NOTE: Provide the non-default value for the Constant!*/.info.DateTimeFormat)); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case5_ConvertTests_NullableIntToNullableEnum_NullReferenceException -var _ = (Func)((int? p) => //Enum1? - p.HasValue ? - (Enum1?)p.Value : (Enum1?)null); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case3_SecurityVerificationException -var _ = (Func)(( - SampleClass s, - int i) => //string - s.GetOther(i).OtherStrProp); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case2_NullRefException -var _ = (Func)(( - Expression expr, - IDataContext dctx, - object[] ps) => //object - (object)ConvertTo.From(((c__DisplayClass6_0)((ConstantExpression)((MemberExpression)((UnaryExpression)((MethodCallExpression)((LambdaExpression)((UnaryExpression)((MethodCallExpression)expr).Arguments.Item).Operand).Body).Arguments.Item).Operand).Expression).Value).flag)); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_283_Case2_Minimal_NullRefException -var _ = (Func)((object o) => //object - (object)((c__DisplayClass6_0)o).flag); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_case_4_simplified_InvalidCastException -var _ = (Func)(() => //SimpleDelegate - (SimpleDelegate)(new Delegate[]{null})[0]); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_case_4_Full_InvalidCastException -var _ = (Func)((object object_0) => //object -{ - SampleClass sampleClass_1 = null; - sampleClass_1 = new SampleClass( - object_0, - new Delegate[]{default(Func)/*NOTE: Provide the non-default value for the Constant!*/, default(Func)/*NOTE: Provide the non-default value for the Constant!*/, default(Action)/*NOTE: Provide the non-default value for the Constant!*/, default(SimpleDelegate)/*NOTE: Provide the non-default value for the Constant!*/, default(Func)/*NOTE: Provide the non-default value for the Constant!*/}); - (default(Action)/*NOTE: Provide the non-default value for the Constant!*/).Invoke( - sampleClass_1); - return sampleClass_1; -}); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_case_3_Full_NullReferenceException -var _ = (Func>)(( - IQueryRunner qr, - IDataReader dr) => //IGrouping - ((Func>)(( - IQueryRunner qr_1, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps, - object[] preamble) => //IGrouping - { - SQLiteDataReader ldr = null; - ldr = (SQLiteDataReader)dr; - return GroupByHelper>.GetGrouping( - qr_1, - dctx, - rd, - default(List)/*NOTE: Provide the non-default value for the Constant!*/, - expr, - ps, - (Func)(( - IQueryRunner qr_1, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps) => //bool - ldr.IsDBNull(0) ? false : - (bool)ConvertBuilder.ConvertDefault( - (object)ldr.GetInt64(0), - typeof(bool))), - (Func>)null); - })) - .Invoke( - qr, - qr.DataContext, - dr, - qr.Expression, - qr.Parameters, - qr.Preambles)); - -//Issue274_Failing_Expressions_in_Linq2DB.Test_case_1_Full_AccessViolationException -var _ = (Func>)(( - IQueryRunner qr, - IDataReader dr) => //f__AnonymousType142 - ((Func>)(( - IQueryRunner qr_1, - IDataContext dctx, - IDataReader rd, - Expression expr, - object[] ps, - object[] preamble) => //f__AnonymousType142 - { - SQLiteDataReader ldr = null; - f__AnonymousType142 f__AnonymousType142_int___0 = null; - ldr = (SQLiteDataReader)dr; - f__AnonymousType142_int___0 = new f__AnonymousType142((((ldr.IsDBNull(0) ? (int?)null : - new int?(ldr.GetInt32(0))) != (int?)null) ? - ldr.IsDBNull(0) ? (int?)null : - new int?(ldr.GetInt32(0)) : (int?)100)); - return f__AnonymousType142_int___0; - })) - .Invoke( - qr, - qr.DataContext, - dr, - qr.Expression, - qr.Parameters, - qr.Preambles)); - -//Issue281_Index_Out_of_Range.Index_Out_of_Range -var _ = (Func, int, string>)(( - List list_string__0, - int int_1) => //string - list_string__0[int_1].ToString()); - -//Issue281_Index_Out_of_Range.Index_Out_of_Range -var _ = (Func, int, string>)(( - List list_string__0, - int int_1) => //string - list_string__0[int_1].ToString()); - -//Issue284_Invalid_Program_after_Coalesce.New_test -var _ = (Func)(( - Variable issue284_Invalid_Program_after_Coalesce_Variable_0, - string string_1) => //Variable -{ - _ = issue284_Invalid_Program_after_Coalesce_Variable_0 ?? new Variable("default"); - issue284_Invalid_Program_after_Coalesce_Variable_0.Name = string_1; - return issue284_Invalid_Program_after_Coalesce_Variable_0; -}); - -//Issue284_Invalid_Program_after_Coalesce.Invalid_expression_with_Coalesce_when_invoked_should_throw_NullRef_the_same_as_system_compiled -var _ = (Func)(( - Variable variable_0, - string string_1) => //Variable -{ - _ = variable_0 ?? new Variable("default"); - variable_0.Name = string_1; - return variable_0; -}); - -//Issue284_Invalid_Program_after_Coalesce.Invalid_Program_after_Coalesce -var _ = (Func)(( - Variable variable_0, - string string_1) => //Variable -{ - variable_0 = variable_0 ?? new Variable("default"); - variable_0.Name = string_1; - return variable_0; -}); - -//Issue284_Invalid_Program_after_Coalesce.Coalesce_in_Assign_in_Block -var _ = (Func)(( - Variable variable_0, - string string_1) => //Variable -{ - variable_0 = variable_0 ?? new Variable("default"); - return variable_0; -}); - -//Issue284_Invalid_Program_after_Coalesce.New_test -var _ = (Func)(( - Variable issue284_Invalid_Program_after_Coalesce_Variable_0, - string string_1) => //Variable -{ - _ = issue284_Invalid_Program_after_Coalesce_Variable_0 ?? new Variable("default"); - issue284_Invalid_Program_after_Coalesce_Variable_0.Name = string_1; - return issue284_Invalid_Program_after_Coalesce_Variable_0; -}); - -//Issue284_Invalid_Program_after_Coalesce.Invalid_expression_with_Coalesce_when_invoked_should_throw_NullRef_the_same_as_system_compiled -var _ = (Func)(( - Variable variable_0, - string string_1) => //Variable -{ - _ = variable_0 ?? new Variable("default"); - variable_0.Name = string_1; - return variable_0; -}); - -//Issue284_Invalid_Program_after_Coalesce.Invalid_Program_after_Coalesce -var _ = (Func)(( - Variable variable_0, - string string_1) => //Variable -{ - variable_0 = variable_0 ?? new Variable("default"); - variable_0.Name = string_1; - return variable_0; -}); - -//Issue284_Invalid_Program_after_Coalesce.Coalesce_in_Assign_in_Block -var _ = (Func)(( - Variable variable_0, - string string_1) => //Variable -{ - variable_0 = variable_0 ?? new Variable("default"); - return variable_0; -}); - -//Issue293_Recursive_Methods.Test_Recursive_Expression -var _ = (Func)((int n) => //int -{ - Func[] facs = null; - Func fac = null; - facs = new Func[1]; - fac = (Func)((int n) => //int - (n <= 1) ? 1 : - n * (facs[0]).Invoke( - n - 1)); - facs[0] = fac; - return fac.Invoke( - n); -}); - -//Issue293_Recursive_Methods.Test_Recursive_Expression -var _ = (Func)((int n) => //int -{ - Func[] facs = null; - Func fac = null; - facs = new Func[1]; - fac = (Func)((int n) => //int - (n <= 1) ? 1 : - n * (facs[0]).Invoke( - n - 1)); - facs[0] = fac; - return fac.Invoke( - n); -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Invoke_Lambda_inlining_case -var _ = (Func)(( - Post post_0, - Post post_1) => //Post -{ - Post result = null; - if (post_0 == (Post)null) - { - return (Post)null; - } - result = post_1 ?? new Post(); - result.Dic = ((Func, IDictionary, IDictionary>)(( - IDictionary iDictionary_string__string__2, - IDictionary iDictionary_string__string__3) => //IDictionary - { - IDictionary result_1 = null; - if (iDictionary_string__string__2 == (IDictionary)null) - { - return (IDictionary)null; - } - result_1 = iDictionary_string__string__3 ?? new Dictionary(); - result_1["Secret"] = (string)null; - if (object.ReferenceEquals( - iDictionary_string__string__2, - result_1)) - { - return result_1; - } - IEnumerator> enumerator = null; - enumerator = iDictionary_string__string__2.GetEnumerator(); - while (true) - { - if (enumerator.MoveNext()) - { - KeyValuePair kvp = default; - kvp = enumerator.Current; - string key = null; - key = kvp.Key; - result_1[key] = kvp.Value; - } - else - { - goto LoopBreak; - } - } - LoopBreak:; - iDictionary_string__string__0:; - return result_1; - })) - .Invoke( - post_0.Dic, - result.Dic); - result.Secret = (string)null; - return result; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Invoke_Lambda_inlining_case_simplified -var _ = (Func)((Post post) => //Post -{ - post.Dic = ((Func, IDictionary>)((IDictionary dict) => //IDictionary - { - return dict; - })) - .Invoke( - post.Dic); - return post; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_300 -var _ = (Func)(( - Customer customer_0, - CustomerDTO customerDTO_1) => //CustomerDTO -{ - CustomerDTO result = null; - if (customer_0 == (Customer)null) - { - return (CustomerDTO)null; - } - result = customerDTO_1 ?? new CustomerDTO(); - result.Id = customer_0.Id; - result.Name = customer_0.Name; - result.Address = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( - customer_0.Address, - result.Address); - result.HomeAddress = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( - customer_0.HomeAddress, - result.HomeAddress); - result.Addresses = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( - customer_0.Addresses, - result.Addresses); - result.WorkAddresses = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction, List>().Invoke( - customer_0.WorkAddresses, - result.WorkAddresses); - result.AddressCity = (customer_0.Address == (Address)null) ? (string)null : - customer_0.Address.City; - return result; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_MemberInit_PrivateProperty -var _ = (Func)((object object_0) => //CustomerDTO2 -{ - CustomerWithPrivateProperty customerWithPrivateProperty_1 = null; - customerWithPrivateProperty_1 = (CustomerWithPrivateProperty)object_0; - return (customerWithPrivateProperty_1 == (CustomerWithPrivateProperty)null) ? (CustomerDTO2)null : - new CustomerDTO2() - { - Id = customerWithPrivateProperty_1.Id, - Name = customerWithPrivateProperty_1.Name - }; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_MemberInit_InternalProperty -var _ = (Func)((SimplePoco simplePoco_0) => //SimpleDto - (simplePoco_0 == (SimplePoco)null) ? (SimpleDto)null : - new SimpleDto() - { - Id = simplePoco_0.Id, - Name = simplePoco_0.Name - }); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_not_return_when_followup_expression_is_present -var _ = (Func)(() => //int -{ - goto void_0; - void_0:; - return 42; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_not_return_when_followup_expression_is_present_Custom_constant_output -var _ = (Func)(() => //Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Post -{ - goto void_0; - void_0:; - return new Post { Secret = "b" }; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_return_the_goto_value_when_no_other_expressions_is_present -var _ = (Func)(() => //int -{ - return 22; - int_0:; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Dictionary_case -var _ = (Func>)((object object_0) => //Dictionary -{ - SimplePoco simplePoco_1 = null; - simplePoco_1 = (SimplePoco)object_0; - return (simplePoco_1 == (SimplePoco)null) ? (Dictionary)null : - new Dictionary() - { - {"Id", (object)simplePoco_1.Id}, - {"Name", (simplePoco_1.Name == (string)null) ? null : - (object)simplePoco_1.Name} - }; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_TryCatch_case -var _ = (Func)((object object_0) => //Test -{ - Test test_1 = null; - test_1 = (Test)object_0; - MapContextScope scope = null; - if (test_1 == (Test)null) - { - return (Test)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - Test result = null; - references = scope.Context.References; - key = new ReferenceTuple( - test_1, - typeof(Test)); - if (references.TryGetValue( - key, - out cache)) - { - return (Test)cache; - } - result = new Test(); - references[key] = (object)result; - result.TestString = test_1.TestString; - return result; - } - finally - { - scope.Dispose(); - } - issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Test_0:; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301 -var _ = (Func)((Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Address[] issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0) => //Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[] -{ - Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[] result = null; - if (issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0 == (Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Address[])null) - { - return (Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[])null; - } - result = new AddressDTO[issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0.Length]; - int v = default; - v = 0; - int i = default; - int len = default; - i = 0; - len = issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0.Length; - while (true) - { - if (i < len) - { - Address item = null; - item = issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0[i]; - result[v++] = (item == (Address)null) ? (AddressDTO)null : - new AddressDTO() - { - Id = item.Id, - City = item.City, - Country = item.Country - }; - i++; - } - else - { - goto LoopBreak; - } - } - LoopBreak:; - return result; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Invoke_Lambda_inlining_case -var _ = (Func)(( - Post post_0, - Post post_1) => //Post -{ - Post result = null; - if (post_0 == (Post)null) - { - return (Post)null; - } - result = post_1 ?? new Post(); - result.Dic = ((Func, IDictionary, IDictionary>)(( - IDictionary iDictionary_string__string__2, - IDictionary iDictionary_string__string__3) => //IDictionary - { - IDictionary result_1 = null; - if (iDictionary_string__string__2 == (IDictionary)null) - { - return (IDictionary)null; - } - result_1 = iDictionary_string__string__3 ?? new Dictionary(); - result_1["Secret"] = (string)null; - if (object.ReferenceEquals( - iDictionary_string__string__2, - result_1)) - { - return result_1; - } - IEnumerator> enumerator = null; - enumerator = iDictionary_string__string__2.GetEnumerator(); - while (true) - { - if (enumerator.MoveNext()) - { - KeyValuePair kvp = default; - kvp = enumerator.Current; - string key = null; - key = kvp.Key; - result_1[key] = kvp.Value; - } - else - { - goto LoopBreak; - } - } - LoopBreak:; - iDictionary_string__string__0:; - return result_1; - })) - .Invoke( - post_0.Dic, - result.Dic); - result.Secret = (string)null; - return result; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Invoke_Lambda_inlining_case_simplified -var _ = (Func)((Post post) => //Post -{ - post.Dic = ((Func, IDictionary>)((IDictionary dict) => //IDictionary - { - return dict; - })) - .Invoke( - post.Dic); - return post; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_300 -var _ = (Func)(( - Customer customer_0, - CustomerDTO customerDTO_1) => //CustomerDTO -{ - CustomerDTO result = null; - if (customer_0 == (Customer)null) - { - return (CustomerDTO)null; - } - result = customerDTO_1 ?? new CustomerDTO(); - result.Id = customer_0.Id; - result.Name = customer_0.Name; - result.Address = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( - customer_0.Address, - result.Address); - result.HomeAddress = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( - customer_0.HomeAddress, - result.HomeAddress); - result.Addresses = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction().Invoke( - customer_0.Addresses, - result.Addresses); - result.WorkAddresses = TypeAdapterConfig.GlobalSettings.GetMapToTargetFunction, List>().Invoke( - customer_0.WorkAddresses, - result.WorkAddresses); - result.AddressCity = (customer_0.Address == (Address)null) ? (string)null : - customer_0.Address.City; - return result; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_MemberInit_PrivateProperty -var _ = (Func)((object object_0) => //CustomerDTO2 -{ - CustomerWithPrivateProperty customerWithPrivateProperty_1 = null; - customerWithPrivateProperty_1 = (CustomerWithPrivateProperty)object_0; - return (customerWithPrivateProperty_1 == (CustomerWithPrivateProperty)null) ? (CustomerDTO2)null : - new CustomerDTO2() - { - Id = customerWithPrivateProperty_1.Id, - Name = customerWithPrivateProperty_1.Name - }; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_MemberInit_InternalProperty -var _ = (Func)((SimplePoco simplePoco_0) => //SimpleDto - (simplePoco_0 == (SimplePoco)null) ? (SimpleDto)null : - new SimpleDto() - { - Id = simplePoco_0.Id, - Name = simplePoco_0.Name - }); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_not_return_when_followup_expression_is_present -var _ = (Func)(() => //int -{ - goto void_0; - void_0:; - return 42; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_not_return_when_followup_expression_is_present_Custom_constant_output -var _ = (Func)(() => //Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Post -{ - goto void_0; - void_0:; - return new Post { Secret = "b" }; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Goto_to_label_with_default_value_should_return_the_goto_value_when_no_other_expressions_is_present -var _ = (Func)(() => //int -{ - return 22; - int_0:; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_Dictionary_case -var _ = (Func>)((object object_0) => //Dictionary -{ - SimplePoco simplePoco_1 = null; - simplePoco_1 = (SimplePoco)object_0; - return (simplePoco_1 == (SimplePoco)null) ? (Dictionary)null : - new Dictionary() - { - {"Id", (object)simplePoco_1.Id}, - {"Name", (simplePoco_1.Name == (string)null) ? null : - (object)simplePoco_1.Name} - }; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301_TryCatch_case -var _ = (Func)((object object_0) => //Test -{ - Test test_1 = null; - test_1 = (Test)object_0; - MapContextScope scope = null; - if (test_1 == (Test)null) - { - return (Test)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - Test result = null; - references = scope.Context.References; - key = new ReferenceTuple( - test_1, - typeof(Test)); - if (references.TryGetValue( - key, - out cache)) - { - return (Test)cache; - } - result = new Test(); - references[key] = (object)result; - result.TestString = test_1.TestString; - return result; - } - finally - { - scope.Dispose(); - } - issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Test_0:; -}); - -//Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Test_301 -var _ = (Func)((Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Address[] issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0) => //Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[] -{ - Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[] result = null; - if (issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0 == (Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.Address[])null) - { - return (Issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3.AddressDTO[])null; - } - result = new AddressDTO[issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0.Length]; - int v = default; - v = 0; - int i = default; - int len = default; - i = 0; - len = issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0.Length; - while (true) - { - if (i < len) - { - Address item = null; - item = issue300_Bad_label_content_in_ILGenerator_in_the_Mapster_benchmark_with_FEC_V3_Address_a_0[i]; - result[v++] = (item == (Address)null) ? (AddressDTO)null : - new AddressDTO() - { - Id = item.Id, - City = item.City, - Country = item.Country - }; - i++; - } - else - { - goto LoopBreak; - } - } - LoopBreak:; - return result; -}); - -//Issue302_Error_compiling_expression_with_array_access.Test1 -var _ = (Func)((LinqTestModel m) => //int - (m.Array)[default(c__DisplayClass1_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.counter].ValorInt); - -//Issue302_Error_compiling_expression_with_array_access.Test1 -var _ = (Func)((LinqTestModel m) => //int - (m.Array)[default(c__DisplayClass1_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.counter].ValorInt); - -//Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing.Test_double_array_index_access -var _ = (Func)(() => //double -{ - double[] arr = null; - arr = new double[1]; - arr[0] = 123.456; - default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0]); - default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0]); - return arr[0]; -}); - -//Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing.Test_double_array_index_access_and_instance_call -var _ = (Func)(() => //double -{ - double[] arr = null; - arr = new double[1]; - arr[0] = 123.456; - default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0].CompareTo(123.456)); - default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0].CompareTo(123.456)); - return arr[0]; -}); - -//Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing.Test_double_array_index_access -var _ = (Func)(() => //double -{ - double[] arr = null; - arr = new double[1]; - arr[0] = 123.456; - default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0]); - default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0]); - return arr[0]; -}); - -//Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing.Test_double_array_index_access_and_instance_call -var _ = (Func)(() => //double -{ - double[] arr = null; - arr = new double[1]; - arr[0] = 123.456; - default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0].CompareTo(123.456)); - default(Issue305_CompileFast_generates_incorrect_code_with_arrays_and_printing)/*NOTE: Provide the non-default value for the Constant!*/.WriteLine(arr[0].CompareTo(123.456)); - return arr[0]; -}); - -//Issue307_Switch_with_fall_through_throws_InvalidProgramException.Test1 -var _ = (Func)((int p) => //string -{ - switch (p) - { - case 1: - case 2: - return "foo"; - break; - default: - return "bar"; - break; - } - string_0:; -}); - -//Issue307_Switch_with_fall_through_throws_InvalidProgramException.Test1 -var _ = (Func)((int p) => //string -{ - switch (p) - { - case 1: - case 2: - return "foo"; - break; - default: - return "bar"; - break; - } - string_0:; -}); - -//Issue308_Wrong_delegate_type_returned_with_closure.Test1 -var _ = (Func)((string vm) => //Command - (Command)(() => //string - vm)); - -//Issue308_Wrong_delegate_type_returned_with_closure.Test1 -var _ = (Func)((string vm) => //Command - (Command)(() => //string - vm)); - -//Issue309_InvalidProgramException_with_MakeBinary_liftToNull_true.Test1 -var _ = (Func)(() => //object - (object)((int?)null > (int?)10)); - -//Issue309_InvalidProgramException_with_MakeBinary_liftToNull_true.Test1 -var _ = (Func)(() => //object - (object)((int?)null > (int?)10)); - -//Issue316_in_parameter.Test_constructor_in_struct_parameter_constant -var _ = (Action)(() => //void -{ - throw new ParseException( - "314", - default(TextPosition)/*NOTE: Provide the non-default value for the Constant!*/); -}); - -//Issue316_in_parameter.Test_method_in_struct_parameter_constant -var _ = (Action)(() => //void -{ - ThrowParseException(default(TextPosition)/*NOTE: Provide the non-default value for the Constant!*/); -}); - -//Issue316_in_parameter.Test_constructor_in_struct_parameter_constant -var _ = (Action)(() => //void -{ - throw new ParseException( - "314", - default(TextPosition)/*NOTE: Provide the non-default value for the Constant!*/); -}); - -//Issue316_in_parameter.Test_method_in_struct_parameter_constant -var _ = (Action)(() => //void -{ - ThrowParseException(default(TextPosition)/*NOTE: Provide the non-default value for the Constant!*/); -}); - -//Issue316_in_parameter.Test_constructor_in_struct_parameter_constant_with_NoArgByRef_New -var _ = (Action)(() => //void -{ - throw new ParseExceptionNoByRefArgs( - "314", - default(TextPosition)/*NOTE: Provide the non-default value for the Constant!*/); -}); - -//Issue320_Bad_label_content_in_ILGenerator_when_creating_through_DynamicModule.Test_instance_call -var _ = (Func)(() => //int -{ - int ret = default; - if (true) - { - ret = new TestMethods(314).InstanceMethod(); - } - int_0:; - return ret; -}); - -//Issue320_Bad_label_content_in_ILGenerator_when_creating_through_DynamicModule.Test_instance_call -var _ = (Func)(() => //int -{ - int ret = default; - if (true) - { - ret = new TestMethods(314).InstanceMethod(); - } - int_0:; - return ret; -}); - -//Issue321_Call_with_out_parameter_to_field_type_that_is_not_value_type_fails.Test_outparameter -var _ = (Action)(() => //void -{ - TestStringOutMethod( - "hello world", - out default(TestPOD)/*NOTE: Provide the non-default value for the Constant!*/.stringvalue); - TestIntOutMethod( - 4, - out default(TestPOD)/*NOTE: Provide the non-default value for the Constant!*/.intvalue); -}); - -//Issue321_Call_with_out_parameter_to_field_type_that_is_not_value_type_fails.Test_outparameter -var _ = (Action)(() => //void -{ - TestStringOutMethod( - "hello world", - out default(TestPOD)/*NOTE: Provide the non-default value for the Constant!*/.stringvalue); - TestIntOutMethod( - 4, - out default(TestPOD)/*NOTE: Provide the non-default value for the Constant!*/.intvalue); -}); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_member_not_equal_to_null_inside_predicate -var _ = (Func)((Test t) => //bool - Enumerable.Any( - t.A, - (Func)((Test2 e) => //bool - e.Value != (Decimal?)null))); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a == (Decimal?)0m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a != (Decimal?)0m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a > (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a >= (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a <= (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a < (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a <= (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a > (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a != (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a == (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a != (Decimal?)1.366m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a == (Decimal?)1.366m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a == (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a != (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a == b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a != b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a > b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a >= b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a <= b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a < b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a <= b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a > b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a != b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a == b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a != b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a == b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a == b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a != b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_to_zero -var _ = (Func)((Decimal? n) => //bool - n != ((Decimal?)0m)); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_greater_than_zero -var _ = (Func)((Decimal? n) => //bool - n > ((Decimal?)0m)); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_decimal -var _ = (Func)((Decimal? n) => //bool - n != ((Decimal?)1.11m)); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_less_then_decimal -var _ = (Func)((Decimal? n) => //bool - n < ((Decimal?)1.11m)); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_to_null -var _ = (Func)((Decimal? n) => //bool - n != (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Null_not_equal_to_nullable_decimal -var _ = (Func)((Decimal? n) => //bool - (Decimal?)null != n); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_equal_to_null -var _ = (Func)((Decimal? n) => //bool - n == (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_member_not_equal_to_null -var _ = (Func)((Test2 t) => //bool - t.Value != (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_member_not_equal_to_null_inside_predicate -var _ = (Func)((Test t) => //bool - Enumerable.Any( - t.A, - (Func)((Test2 e) => //bool - e.Value != (Decimal?)null))); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a == (Decimal?)0m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a != (Decimal?)0m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a > (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a >= (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a <= (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a < (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a <= (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a > (Decimal?)1.11m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a != (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a == (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a != (Decimal?)1.366m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a == (Decimal?)1.366m); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a == (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameters_comparison_cases -var _ = (Func)((Decimal? a) => //bool - a != (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a == b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a != b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a > b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a >= b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a <= b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a < b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a <= b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a > b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a != b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a == b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a != b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a == b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a == b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_parameter_with_decimal_constant_comparison_cases -var _ = (Func)(( - Decimal? a, - Decimal? b) => //bool - a != b); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_to_zero -var _ = (Func)((Decimal? n) => //bool - n != ((Decimal?)0m)); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_greater_than_zero -var _ = (Func)((Decimal? n) => //bool - n > ((Decimal?)0m)); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_decimal -var _ = (Func)((Decimal? n) => //bool - n != ((Decimal?)1.11m)); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_less_then_decimal -var _ = (Func)((Decimal? n) => //bool - n < ((Decimal?)1.11m)); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_not_equal_to_null -var _ = (Func)((Decimal? n) => //bool - n != (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Null_not_equal_to_nullable_decimal -var _ = (Func)((Decimal? n) => //bool - (Decimal?)null != n); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_equal_to_null -var _ = (Func)((Decimal? n) => //bool - n == (Decimal?)null); - -//Issue341_Equality_comparison_between_nullable_and_null_inside_Any_produces_incorrect_compiled_expression.Nullable_decimal_member_not_equal_to_null -var _ = (Func)((Test2 t) => //bool - t.Value != (Decimal?)null); - -//Issue346_Is_it_possible_to_implement_ref_local_variables.Check_assignment_to_by_ref_float_parameter_PostIncrement_Returning -var _ = (IncRefFloatReturning)((ref float x) => //float -{ - return x++; -}); - -//Issue346_Is_it_possible_to_implement_ref_local_variables.Check_assignment_to_by_ref_int_parameter_PostIncrement_Returning -var _ = (IncRefintReturning)((ref int x) => //int -{ - return x++; -}); - -//Issue346_Is_it_possible_to_implement_ref_local_variables.Check_assignment_to_by_ref_int_parameter_PostIncrement_Void -var _ = (IncRefInt)((ref int x) => //void -{ - x++; -}); - -//Issue346_Is_it_possible_to_implement_ref_local_variables.Get_array_element_ref_and_member_change_and_Pre_increment_it -var _ = (Func)((Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] aPar) => //int -{ - Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] aVar = null; - int i = default; - Vector3 v__discard_init_by_ref = default; ref var v = ref v__discard_init_by_ref; - aVar = aPar; - i = 9; - v = ref aVar[i]; - return ++v.x; -}); - -//Issue346_Is_it_possible_to_implement_ref_local_variables.Get_array_element_ref_and_member_change_and_Post_increment_it -var _ = (Func)((Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] aPar) => //int -{ - Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] aVar = null; - int i = default; - Vector3 v__discard_init_by_ref = default; ref var v = ref v__discard_init_by_ref; - aVar = aPar; - i = 9; - v = ref aVar[i]; - return v.x++; -}); - -//Issue346_Is_it_possible_to_implement_ref_local_variables.Real_world_test_ref_array_element -var _ = (Func)(() => //Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] -{ - Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] array = null; - int i = default; - array = new Vector3[100]; - i = 0; - while (true) - { - if (i < array.Length) - { - Vector3 v__discard_init_by_ref = default; ref var v = ref v__discard_init_by_ref; - v = ref array[i]; - v.x += 12; - v.Normalize(); - ++i; - } - else - { - goto void_0; - } - } - void_0:; - return array; -}); - -//Issue346_Is_it_possible_to_implement_ref_local_variables.Get_array_element_ref_and_member_change_and_increment_it_then_method_call_on_ref_value_elem -var _ = (Func)(() => //Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] -{ - Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] a = null; - int i = default; - Vector3 v__discard_init_by_ref = default; ref var v = ref v__discard_init_by_ref; - a = new Vector3[10]; - i = 0; - v = ref a[i]; - v.x += 12; - v.Normalize(); - return a; -}); - -//Issue346_Is_it_possible_to_implement_ref_local_variables.Get_array_element_ref_and_member_change_and_increment_it -var _ = (Func)(() => //Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] -{ - Issue346_Is_it_possible_to_implement_ref_local_variables.Vector3[] a = null; - int i = default; - Vector3 v__discard_init_by_ref = default; ref var v = ref v__discard_init_by_ref; - a = new Vector3[10]; - i = 0; - v = ref a[i]; - v.x += 12; - return a; -}); - -//Issue346_Is_it_possible_to_implement_ref_local_variables.Get_array_element_ref_and_increment_it -var _ = (Action)((int[] a) => //void -{ - int n__discard_init_by_ref = default; ref var n = ref n__discard_init_by_ref; - n = ref a[0]; - n += 1; -}); - -//Issue346_Is_it_possible_to_implement_ref_local_variables.Check_assignment_to_by_ref_int_parameter_PlusOne -var _ = (IncRefInt)((ref int x) => //void -{ - x += 1; -}); - -//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Issue478_Test_diagnostics -var _ = (Func>)((int n) => //Func - (Func)(() => //int - n + 1)); - -//TestTools.C:\dev\FastExpressionCompiler\test\FastExpressionCompiler.IssueTests\Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.cs -var Issue478_Test_diagnostics = (Func>)((int n) => //Func - (Func)(() => //int - n + 1)); - -//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_struct_parameter_in_closure_of_the_nested_lambda -var _ = (Func)((NotifyModel m) => //int - Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int - m.Number1))); - -//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_passing_struct_item_in_object_array_parameter -var _ = (Func)((object[] arr) => //int - ((NotifyModel)arr[0]).Number1); - -//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_nullable_param_in_closure_of_the_nested_lambda -var _ = (Func)((int? p) => //int - Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int - p.Value))); - -//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_nullable_of_struct_and_struct_field_in_the_nested_lambda -var _ = (Func)((NotifyContainer? p) => //int - Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int - p.Value.model.Number1))); - -//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Issue478_Test_diagnostics -var _ = (Func>)((int n) => //Func - (Func)(() => //int - n + 1)); - -//TestTools.C:\dev\FastExpressionCompiler\test\FastExpressionCompiler.IssueTests\Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.cs -var Issue478_Test_diagnostics = (Func>)((int n) => //Func - (Func)(() => //int - n + 1)); - -//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_struct_parameter_in_closure_of_the_nested_lambda -var _ = (Func)((NotifyModel m) => //int - Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int - m.Number1))); - -//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_passing_struct_item_in_object_array_parameter -var _ = (Func)((object[] arr) => //int - ((NotifyModel)arr[0]).Number1); - -//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_nullable_param_in_closure_of_the_nested_lambda -var _ = (Func)((int? p) => //int - Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int - p.Value))); - -//Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Test_nullable_of_struct_and_struct_field_in_the_nested_lambda -var _ = (Func)((NotifyContainer? p) => //int - Issue347_InvalidProgramException_on_compiling_an_expression_that_returns_a_record_which_implements_IList.Inc((Func)(() => //int - p.Value.model.Number1))); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Add -var _ = (Action)((int[] a) => //void -{ - a[1] = a[1] + 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_PlusOne -var _ = (Action)((int[] a) => //void -{ - a[2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_IndexerAccess_Assign_InAction -var _ = (Action)((ArrVal a) => //void -{ - a["b", 2] = 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_IndexerAccess_AddAssign_PlusOne_InAction -var _ = (RefArrVal)((ref ArrVal a) => //void -{ - a["b", 2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_IndexerAccess_AddAssign_PlusOne_InAction -var _ = (Action)((ArrVal a) => //void -{ - a["b", 2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_IndexerAccess_Assign_InAction -var _ = (RefArrVal)((ref ArrVal a) => //void -{ - a["b", 2] = 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Assign_ParameterByRef_InAction -var _ = (ArrAndRefParam)(( - int[] a, - ref int b) => //void -{ - a[2] = b; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MultiArrayAccess_AddAssign_PlusOne -var _ = (Action)((int[,] a) => //void -{ - a[1, 2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_IndexerAccess_AddAssign_PlusOne_InAction -var _ = (Action)((Arr a) => //void -{ - a["b", 2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_NullablePlusNullable -var _ = (Action[]>)((Nullable[] a) => //void -{ - a[2] += (int?)33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ArrayAccess_AddAssign_PlusOne -var _ = (RefArr)((ref int[] a) => //void -{ - a[2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_NoIndexer_AddAssign_PlusOne -var _ = (RefArrValNoIndexer)((ref ArrValNoIndexer a) => //void -{ - a.SetItem( - "b", - 2, - a.GetItem( - "b", - 2) + 1); -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_PreIncrement -var _ = (Action)((int[] a) => //void -{ - ++a[2]; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_InAction -var _ = (Action)((int[] a) => //void -{ - a[2] += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_ReturnResultInFunction -var _ = (Func)((int[] a) => //int -{ - return a[2] += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MultiArrayAccess_Assign_InAction -var _ = (Action)((int[,] a) => //void -{ - a[1, 2] = 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_IndexerAccess_Assign_InAction -var _ = (Action)((Arr a) => //void -{ - a["b", 2] = 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Assign_InAction -var _ = (Action)((int[] a) => //void -{ - a[2] = 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_ToNewExpression -var _ = (Func)(() => //int -{ - return (new Box(42)).Field += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_StaticMember -var _ = (Action)(() => //void -{ - Box.StaticField += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_StaticProp -var _ = (Action)(() => //void -{ - Box.StaticProp += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign -var _ = (Action)((Box b) => //void -{ - b.Field += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PlusOneAssign -var _ = (Action)((Box b) => //void -{ - b.Field += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_NullablePlusNullable -var _ = (Action)((Box b) => //void -{ - b.NullableField += (int?)33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_NullablePlusNullable_Prop -var _ = (Action)((Box b) => //void -{ - b.NullableProp += (int?)33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PostIncrementAssign_Nullable_ReturningNullable -var _ = (RefValReturningNullable)((ref Val v) => //int? -{ - return v.NullableField++; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable -var _ = (RefValReturningNullable)((ref Val v) => //int? -{ - return ++v.NullableField; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable_Prop -var _ = (RefValReturningNullable)((ref Val v) => //int? -{ - return ++v.NullableProp; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable -var _ = (RefVal)((ref Val v) => //void -{ - ++v.NullableField; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_Prop -var _ = (RefVal)((ref Val v) => //void -{ - ++v.NullableProp; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PostIncrementAssign_Returning -var _ = (RefValReturning)((ref Val v) => //int -{ - return v.Field++; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Returning -var _ = (RefValReturning)((ref Val v) => //int -{ - return ++v.Field; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign -var _ = (RefVal)((ref Val v) => //void -{ - ++v.Field; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign -var _ = (Action)((Box b) => //void -{ - ++b.Field; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Returning -var _ = (Func)((Box b) => //int -{ - return ++b.Field; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PostIncrementAssign_Returning -var _ = (Func)((Box b) => //int -{ - return b.Field++; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreDecrementAssign_ToNewExpression -var _ = (Func)(() => //int -{ - return --(new Box(42)).Field; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Nullable -var _ = (Action)((Box b) => //void -{ - ++b.NullableField; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable -var _ = (Func)((Box b) => //int? -{ - return ++b.NullableField; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PostIncrementAssign_Nullable_ReturningNullable -var _ = (Func)((Box b) => //int? -{ - return b.NullableField++; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Add -var _ = (Action)((int[] a) => //void -{ - a[1] = a[1] + 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_PlusOne -var _ = (Action)((int[] a) => //void -{ - a[2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_IndexerAccess_Assign_InAction -var _ = (Action)((ArrVal a) => //void -{ - a["b", 2] = 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_IndexerAccess_AddAssign_PlusOne_InAction -var _ = (RefArrVal)((ref ArrVal a) => //void -{ - a["b", 2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_IndexerAccess_AddAssign_PlusOne_InAction -var _ = (Action)((ArrVal a) => //void -{ - a["b", 2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_IndexerAccess_Assign_InAction -var _ = (RefArrVal)((ref ArrVal a) => //void -{ - a["b", 2] = 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Assign_ParameterByRef_InAction -var _ = (ArrAndRefParam)(( - int[] a, - ref int b) => //void -{ - a[2] = b; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MultiArrayAccess_AddAssign_PlusOne -var _ = (Action)((int[,] a) => //void -{ - a[1, 2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_IndexerAccess_AddAssign_PlusOne_InAction -var _ = (Action)((Arr a) => //void -{ - a["b", 2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_NullablePlusNullable -var _ = (Action[]>)((Nullable[] a) => //void -{ - a[2] += (int?)33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ArrayAccess_AddAssign_PlusOne -var _ = (RefArr)((ref int[] a) => //void -{ - a[2] += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Val_Ref_NoIndexer_AddAssign_PlusOne -var _ = (RefArrValNoIndexer)((ref ArrValNoIndexer a) => //void -{ - a.SetItem( - "b", - 2, - a.GetItem( - "b", - 2) + 1); -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_PreIncrement -var _ = (Action)((int[] a) => //void -{ - ++a[2]; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_InAction -var _ = (Action)((int[] a) => //void -{ - a[2] += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_AddAssign_ReturnResultInFunction -var _ = (Func)((int[] a) => //int -{ - return a[2] += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MultiArrayAccess_Assign_InAction -var _ = (Action)((int[,] a) => //void -{ - a[1, 2] = 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_IndexerAccess_Assign_InAction -var _ = (Action)((Arr a) => //void -{ - a["b", 2] = 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_ArrayAccess_Assign_InAction -var _ = (Action)((int[] a) => //void -{ - a[2] = 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_ToNewExpression -var _ = (Func)(() => //int -{ - return (new Box(42)).Field += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_StaticMember -var _ = (Action)(() => //void -{ - Box.StaticField += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_StaticProp -var _ = (Action)(() => //void -{ - Box.StaticProp += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign -var _ = (Action)((Box b) => //void -{ - b.Field += 33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PlusOneAssign -var _ = (Action)((Box b) => //void -{ - b.Field += 1; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_NullablePlusNullable -var _ = (Action)((Box b) => //void -{ - b.NullableField += (int?)33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_AddAssign_NullablePlusNullable_Prop -var _ = (Action)((Box b) => //void -{ - b.NullableProp += (int?)33; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PostIncrementAssign_Nullable_ReturningNullable -var _ = (RefValReturningNullable)((ref Val v) => //int? -{ - return v.NullableField++; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable -var _ = (RefValReturningNullable)((ref Val v) => //int? -{ - return ++v.NullableField; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable_Prop -var _ = (RefValReturningNullable)((ref Val v) => //int? -{ - return ++v.NullableProp; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable -var _ = (RefVal)((ref Val v) => //void -{ - ++v.NullableField; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Nullable_Prop -var _ = (RefVal)((ref Val v) => //void -{ - ++v.NullableProp; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PostIncrementAssign_Returning -var _ = (RefValReturning)((ref Val v) => //int -{ - return v.Field++; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign_Returning -var _ = (RefValReturning)((ref Val v) => //int -{ - return ++v.Field; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_Ref_ValueType_MemberAccess_PreIncrementAssign -var _ = (RefVal)((ref Val v) => //void -{ - ++v.Field; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign -var _ = (Action)((Box b) => //void -{ - ++b.Field; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Returning -var _ = (Func)((Box b) => //int -{ - return ++b.Field; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PostIncrementAssign_Returning -var _ = (Func)((Box b) => //int -{ - return b.Field++; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreDecrementAssign_ToNewExpression -var _ = (Func)(() => //int -{ - return --(new Box(42)).Field; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Nullable -var _ = (Action)((Box b) => //void -{ - ++b.NullableField; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PreIncrementAssign_Nullable_ReturningNullable -var _ = (Func)((Box b) => //int? -{ - return ++b.NullableField; -}); - -//Issue352_xxxAssign_does_not_work_with_MemberAccess.Check_MemberAccess_PostIncrementAssign_Nullable_ReturningNullable -var _ = (Func)((Box b) => //int? -{ - return b.NullableField++; -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1 -var _ = (Func)((int n) => //int -{ - Func sumFunc = null; - int m = default; - m = 45; - sumFunc = (Func)((int i) => //int - i + m); - m = 999; - return sumFunc.Invoke( - n); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_simplified -var _ = (Func)((int n) => //int -{ - Func sumFunc = null; - int m = default; - m = 45; - sumFunc = (Func)((int i) => //int - i + m); - m = 999; - return sumFunc.Invoke( - n); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_isolated_assign_int_to_the_array_of_objects_and_use_for_addition -var _ = (Func)((int n) => //int -{ - object[] a = null; - a = new object[]{(object)0}; - a[0] = (object)999; - return n + ((int)a[0]); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_closure_over_array_and_changing_its_element -var _ = (Func)((int n) => //int -{ - Func f = null; - object[] b = null; - f = (Func)((int i) => //int - i + ((int)b[0])); - b = new object[]{(object)999}; - return f.Invoke( - n); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_manual_closure -var _ = (Func)((int n) => //int -{ - Func f = null; - object[] b = null; - f = (Func)(( - object[] a, - int i) => //int - i + ((int)a[0])); - b = new object[]{(object)999}; - return f.Invoke( - b, - n); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test2_original_issue_case -var _ = (Func)((int n) => //int -{ - Func sumFunc = null; - sumFunc = (Func)((int i) => //int - (i == 0) ? 0 : - i + sumFunc.Invoke( - i - 1)); - return sumFunc.Invoke( - n); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1 -var _ = (Func)((int n) => //int -{ - Func sumFunc = null; - int m = default; - m = 45; - sumFunc = (Func)((int i) => //int - i + m); - m = 999; - return sumFunc.Invoke( - n); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_simplified -var _ = (Func)((int n) => //int -{ - Func sumFunc = null; - int m = default; - m = 45; - sumFunc = (Func)((int i) => //int - i + m); - m = 999; - return sumFunc.Invoke( - n); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_isolated_assign_int_to_the_array_of_objects_and_use_for_addition -var _ = (Func)((int n) => //int -{ - object[] a = null; - a = new object[]{(object)0}; - a[0] = (object)999; - return n + ((int)a[0]); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_closure_over_array_and_changing_its_element -var _ = (Func)((int n) => //int -{ - Func f = null; - object[] b = null; - f = (Func)((int i) => //int - i + ((int)b[0])); - b = new object[]{(object)999}; - return f.Invoke( - n); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test1_manual_closure -var _ = (Func)((int n) => //int -{ - Func f = null; - object[] b = null; - f = (Func)(( - object[] a, - int i) => //int - i + ((int)a[0])); - b = new object[]{(object)999}; - return f.Invoke( - b, - n); -}); - -//Issue353_NullReferenceException_when_calling_CompileFast_results.Test2_original_issue_case -var _ = (Func)((int n) => //int -{ - Func sumFunc = null; - sumFunc = (Func)((int i) => //int - (i == 0) ? 0 : - i + sumFunc.Invoke( - i - 1)); - return sumFunc.Invoke( - n); -}); - -//Issue357_Invalid_program_exception.Test1 -var _ = (Func)((ActionItem x) => //bool - x.AccountManagerId == ((long?)default(c__DisplayClass1_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.value)); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(() => //int[] - new int[]{}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(() => //int[] - new int[]{}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)((int p0) => //int[] - new int[]{p0}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)((int p0) => //int[] - new int[]{p0}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1) => //int[] - new int[]{ - p0, - p1}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1) => //int[] - new int[]{ - p0, - p1}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2) => //int[] - new int[]{ - p0, - p1, - p2}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2) => //int[] - new int[]{ - p0, - p1, - p2}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3) => //int[] - new int[]{ - p0, - p1, - p2, - p3}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3) => //int[] - new int[]{ - p0, - p1, - p2, - p3}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9, - int p10) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9, - p10}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9, - int p10) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9, - p10}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9, - int p10, - int p11) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9, - p10, - p11}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9, - int p10, - int p11) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9, - p10, - p11}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9, - int p10, - int p11, - int p12) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9, - p10, - p11, - p12}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9, - int p10, - int p11, - int p12) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9, - p10, - p11, - p12}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9, - int p10, - int p11, - int p12, - int p13) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9, - p10, - p11, - p12, - p13}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9, - int p10, - int p11, - int p12, - int p13) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9, - p10, - p11, - p12, - p13}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9, - int p10, - int p11, - int p12, - int p13, - int p14) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9, - p10, - p11, - p12, - p13, - p14}); - -//Issue363_ActionFunc16Generics.Can_Create_Func -var _ = (Func)(( - int p0, - int p1, - int p2, - int p3, - int p4, - int p5, - int p6, - int p7, - int p8, - int p9, - int p10, - int p11, - int p12, - int p13, - int p14) => //int[] - new int[]{ - p0, - p1, - p2, - p3, - p4, - p5, - p6, - p7, - p8, - p9, - p10, - p11, - p12, - p13, - p14}); - -//Issue365_Working_with_ref_return_values.Test_access_ref_returning_method_then_property -var _ = (Action)((ParamProcessor pp) => //void -{ - pp.GetParamValueByRef().Value = 7; -}); - -//Issue365_Working_with_ref_return_values.Test_access_ref_returning_method_assigned_var_then_property -var _ = (Action)((ParamProcessor pp) => //void -{ - ParamValue varByRef__discard_init_by_ref = default; ref var varByRef = ref varByRef__discard_init_by_ref; - varByRef = ref pp.GetParamValueByRef(); - varByRef.Value = 8; -}); - -//Issue366_FEC334_gives_incorrect_results_in_some_linq_operations.Test1 -var _ = (Func, double>)(( - double threshold, - List mylist) => //double - Enumerable.FirstOrDefault(Enumerable.Where( - mylist, - (Func)((double double_0) => //bool - double_0 > threshold)))); - -//Issue374_CompileFast_does_not_work_with_HasFlag.Test1 -var _ = (Func)((Bar x) => //bool - x.Foo.HasFlag(Foo.Green)); - -//Issue374_CompileFast_does_not_work_with_HasFlag.Test1 -var _ = (Func)((Bar x) => //bool - x.Foo.HasFlag(Foo.Green)); - -//Issue380_Comparisons_with_nullable_types.Test_left_decimal_Nullable_constant -var _ = (Func)((DecimalTest t) => //bool - ((Decimal?)20m) > t.D1); - -//Issue380_Comparisons_with_nullable_types.Test_left_decimal_constant -var _ = (Func)((DecimalTest t) => //bool - ((Decimal?)(Decimal)20) > t.D1); - -//Issue380_Comparisons_with_nullable_types.Test_right_decimal_constant -var _ = (Func)((DecimalTest t) => //bool - t.D1 < ((Decimal?)(Decimal)20)); - -//Issue380_Comparisons_with_nullable_types.Test_left_decimal_Nullable_constant -var _ = (Func)((DecimalTest t) => //bool - (Decimal?)20m > t.D1); - -//Issue380_Comparisons_with_nullable_types.Test_left_decimal_constant -var _ = (Func)((DecimalTest t) => //bool - ((Decimal?)(Decimal)20) > t.D1); - -//Issue380_Comparisons_with_nullable_types.Test_right_decimal_constant -var _ = (Func)((DecimalTest t) => //bool - t.D1 < ((Decimal?)(Decimal)20)); - -//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_null_spec -var _ = (Func)((Message_non_nullable x) => //bool - ((int?)x.UserType) != ((int?)((MessageSpec)null).type)); - -//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_UserType_nullable_type -var _ = (Func)((Message_non_nullable x) => //bool - ((int?)x.UserType) != ((int?)default(MessageSpec_NullableType)/*NOTE: Provide the non-default value for the Constant!*/.type)); - -//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_UserType_non_nullable_type -var _ = (Func)((Message_non_nullable x) => //bool - ((int?)x.UserType) != ((int?)default(MessageSpec)/*NOTE: Provide the non-default value for the Constant!*/.type)); - -//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_nullable_type -var _ = (Func)((Message x) => //bool - ((int?)x.UserType) != ((int?)default(MessageSpec_NullableType)/*NOTE: Provide the non-default value for the Constant!*/.type)); - -//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_type -var _ = (Func)((Message x) => //bool - ((int?)x.UserType) != ((int?)default(MessageSpec)/*NOTE: Provide the non-default value for the Constant!*/.type)); - -//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_null_spec -var _ = (Func)((Message_non_nullable x) => //bool - ((int?)x.UserType) != ((int?)((MessageSpec)null).type)); - -//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_UserType_nullable_type -var _ = (Func)((Message_non_nullable x) => //bool - ((int?)x.UserType) != ((int?)default(MessageSpec_NullableType)/*NOTE: Provide the non-default value for the Constant!*/.type)); - -//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_UserType_non_nullable_type -var _ = (Func)((Message_non_nullable x) => //bool - ((int?)x.UserType) != ((int?)default(MessageSpec)/*NOTE: Provide the non-default value for the Constant!*/.type)); - -//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_nullable_type -var _ = (Func)((Message x) => //bool - ((int?)x.UserType) != ((int?)default(MessageSpec_NullableType)/*NOTE: Provide the non-default value for the Constant!*/.type)); - -//Issue386_Value_can_not_be_null_in_Nullable_convert.Test_non_nullable_type -var _ = (Func)((Message x) => //bool - ((int?)x.UserType) != ((int?)default(MessageSpec)/*NOTE: Provide the non-default value for the Constant!*/.type)); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((AuthResultDto authResultDto_0) => //Token -{ - MapContextScope scope = null; - if (authResultDto_0 == (AuthResultDto)null) - { - return (Token)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - Token result = null; - references = scope.Context.References; - key = new ReferenceTuple( - authResultDto_0, - typeof(Token)); - if (references.TryGetValue( - key, - out cache)) - { - return (Token)cache; - } - result = new Token(); - references[key] = (object)result; - result.RefreshTokenExpirationDate = ((Func)((DateTime? dateTime__1) => //DateTime - (dateTime__1 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__1)) - .Invoke( - (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : - (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_Token_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)(( - AuthResultDto authResultDto_0, - Token token_1) => //Token -{ - MapContextScope scope = null; - if (authResultDto_0 == (AuthResultDto)null) - { - return (Token)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - Token result = null; - references = scope.Context.References; - key = new ReferenceTuple( - authResultDto_0, - typeof(Token)); - if (references.TryGetValue( - key, - out cache)) - { - return (Token)cache; - } - result = token_1 ?? new Token(); - references[key] = (object)result; - result.RefreshTokenExpirationDate = ((Func)(( - DateTime? dateTime__2, - DateTime dateTime_3) => //DateTime - (dateTime__2 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__2)) - .Invoke( - (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : - (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime, - result.RefreshTokenExpirationDate); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_Token_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((ExportInfoModel exportInfoModel_0) => //ExportInfoDto -{ - MapContextScope scope = null; - if (exportInfoModel_0 == (ExportInfoModel)null) - { - return (ExportInfoDto)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - ExportInfoDto result = null; - references = scope.Context.References; - key = new ReferenceTuple( - exportInfoModel_0, - typeof(ExportInfoDto)); - if (references.TryGetValue( - key, - out cache)) - { - return (ExportInfoDto)cache; - } - result = new ExportInfoDto(TypeAdapter[], long[]>.Map.Invoke(exportInfoModel_0.Locations)); - references[key] = (object)result; - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_ExportInfoDto_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)(( - ExportInfoModel exportInfoModel_0, - ExportInfoDto exportInfoDto_1) => //ExportInfoDto -{ - MapContextScope scope = null; - if (exportInfoModel_0 == (ExportInfoModel)null) - { - return (ExportInfoDto)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - ExportInfoDto result = null; - references = scope.Context.References; - key = new ReferenceTuple( - exportInfoModel_0, - typeof(ExportInfoDto)); - if (references.TryGetValue( - key, - out cache)) - { - return (ExportInfoDto)cache; - } - result = new ExportInfoDto(TypeAdapter[], long[]>.Map.Invoke(exportInfoModel_0.Locations)); - references[key] = (object)result; - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_ExportInfoDto_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((TestClass testClass_0) => //TestEnum - (testClass_0 == (TestClass)null) ? (TestEnum)0 : - new TestEnum() - { - value__ = ((testClass_0.Type == 1) ? TestEnum.A : - (testClass_0.Type == 2) ? TestEnum.B : - (testClass_0.Type == 3) ? TestEnum.C : TestEnum.D).value__ - }); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)(( - TestClass testClass_0, - TestEnum testEnum_1) => //TestEnum -{ - TestEnum result = default; - if (testClass_0 == (TestClass)null) - { - return (TestEnum)0; - } - result = testEnum_1; - result.value__ = ((testClass_0.Type == 1) ? TestEnum.A : - (testClass_0.Type == 2) ? TestEnum.B : - (testClass_0.Type == 3) ? TestEnum.C : TestEnum.D).value__; - return result; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((ResultAgent resultAgent_0) => //AgentStatusDto -{ - MapContextScope scope = null; - if (resultAgent_0 == (ResultAgent)null) - { - return (AgentStatusDto)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - AgentStatusDto result = null; - references = scope.Context.References; - key = new ReferenceTuple( - resultAgent_0, - typeof(AgentStatusDto)); - if (references.TryGetValue( - key, - out cache)) - { - return (AgentStatusDto)cache; - } - result = new AgentStatusDto(); - references[key] = (object)result; - result.ErrorCode = ((Func)((int? int__1) => //int - (int__1 == (int?)null) ? 0 : (int)int__1)) - .Invoke( - (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : - (int?)resultAgent_0.Common.Code); - result.CompleteTaskType = ((Func)((int? int__2) => //int - (int__2 == (int?)null) ? 0 : (int)int__2)) - .Invoke( - (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : - (int?)resultAgent_0.Common.TaskType); - default(Action)/*NOTE: Provide the non-default value for the Constant!*/.Invoke( - resultAgent_0, - result); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_AgentStatusDto_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)(( - ResultAgent resultAgent_0, - AgentStatusDto agentStatusDto_1) => //AgentStatusDto -{ - MapContextScope scope = null; - if (resultAgent_0 == (ResultAgent)null) - { - return (AgentStatusDto)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - AgentStatusDto result = null; - references = scope.Context.References; - key = new ReferenceTuple( - resultAgent_0, - typeof(AgentStatusDto)); - if (references.TryGetValue( - key, - out cache)) - { - return (AgentStatusDto)cache; - } - result = agentStatusDto_1 ?? new AgentStatusDto(); - references[key] = (object)result; - result.ErrorCode = ((Func)(( - int? int__2, - int int_3) => //int - (int__2 == (int?)null) ? 0 : (int)int__2)) - .Invoke( - (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : - (int?)resultAgent_0.Common.Code, - result.ErrorCode); - result.CompleteTaskType = ((Func)(( - int? int__4, - int int_5) => //int - (int__4 == (int?)null) ? 0 : (int)int__4)) - .Invoke( - (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : - (int?)resultAgent_0.Common.TaskType, - result.CompleteTaskType); - default(Action)/*NOTE: Provide the non-default value for the Constant!*/.Invoke( - resultAgent_0, - result); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_AgentStatusDto_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((object object_0) => //TestEnum -{ - TestClass testClass_1 = null; - testClass_1 = (TestClass)object_0; - return (testClass_1 == (TestClass)null) ? (TestEnum)0 : - new TestEnum() - { - value__ = ((testClass_1.Type == 1) ? TestEnum.A : - (testClass_1.Type == 2) ? TestEnum.B : - (testClass_1.Type == 3) ? TestEnum.C : TestEnum.D).value__ - }; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((object object_0) => //Token -{ - AuthResultDto authResultDto_1 = null; - authResultDto_1 = (AuthResultDto)object_0; - MapContextScope scope = null; - if (authResultDto_1 == (AuthResultDto)null) - { - return (Token)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - Token result = null; - references = scope.Context.References; - key = new ReferenceTuple( - authResultDto_1, - typeof(Token)); - if (references.TryGetValue( - key, - out cache)) - { - return (Token)cache; - } - result = new Token(); - references[key] = (object)result; - result.RefreshTokenExpirationDate = ((Func)((DateTime? dateTime__2) => //DateTime - (dateTime__2 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__2)) - .Invoke( - (authResultDto_1.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : - (DateTime?)authResultDto_1.RefreshToken.ExpirationDate.LocalDateTime); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_Token_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((object object_0) => //ExportInfoDto -{ - ExportInfoModel exportInfoModel_1 = null; - exportInfoModel_1 = (ExportInfoModel)object_0; - MapContextScope scope = null; - if (exportInfoModel_1 == (ExportInfoModel)null) - { - return (ExportInfoDto)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - ExportInfoDto result = null; - references = scope.Context.References; - key = new ReferenceTuple( - exportInfoModel_1, - typeof(ExportInfoDto)); - if (references.TryGetValue( - key, - out cache)) - { - return (ExportInfoDto)cache; - } - result = new ExportInfoDto(TypeAdapter[], long[]>.Map.Invoke(exportInfoModel_1.Locations)); - references[key] = (object)result; - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_ExportInfoDto_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func[], long[]>)((Nullable[] nullable_long__a_0) => //long[] -{ - MapContextScope scope = null; - if (nullable_long__a_0 == (Nullable[])null) - { - return (long[])null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - long[] result = null; - references = scope.Context.References; - key = new ReferenceTuple( - nullable_long__a_0, - typeof(long[])); - if (references.TryGetValue( - key, - out cache)) - { - return (long[])cache; - } - result = new long[nullable_long__a_0.Length]; - references[key] = (object)result; - int v = default; - v = 0; - int i = default; - int len = default; - i = 0; - len = nullable_long__a_0.Length; - while (true) - { - if (i < len) - { - long? item = null; - item = nullable_long__a_0[i]; - result[v++] = (item == (long?)null) ? (long)0 : (long)item; - i++; - } - else - { - goto LoopBreak; - } - } - LoopBreak:; - return result; - } - finally - { - scope.Dispose(); - } - long_a_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((object object_0) => //AgentStatusDto -{ - ResultAgent resultAgent_1 = null; - resultAgent_1 = (ResultAgent)object_0; - MapContextScope scope = null; - if (resultAgent_1 == (ResultAgent)null) - { - return (AgentStatusDto)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - AgentStatusDto result = null; - references = scope.Context.References; - key = new ReferenceTuple( - resultAgent_1, - typeof(AgentStatusDto)); - if (references.TryGetValue( - key, - out cache)) - { - return (AgentStatusDto)cache; - } - result = new AgentStatusDto(); - references[key] = (object)result; - result.ErrorCode = ((Func)((int? int__2) => //int - (int__2 == (int?)null) ? 0 : (int)int__2)) - .Invoke( - (resultAgent_1.Common == (ResponseAgent)null) ? (int?)null : - (int?)resultAgent_1.Common.Code); - result.CompleteTaskType = ((Func)((int? int__3) => //int - (int__3 == (int?)null) ? 0 : (int)int__3)) - .Invoke( - (resultAgent_1.Common == (ResponseAgent)null) ? (int?)null : - (int?)resultAgent_1.Common.TaskType); - default(Action)/*NOTE: Provide the non-default value for the Constant!*/.Invoke( - resultAgent_1, - result); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_AgentStatusDto_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((AuthResultDto authResultDto_0) => //Token -{ - MapContextScope scope = null; - if (authResultDto_0 == (AuthResultDto)null) - { - return (Token)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - Token result = null; - references = scope.Context.References; - key = new ReferenceTuple( - authResultDto_0, - typeof(Token)); - if (references.TryGetValue( - key, - out cache)) - { - return (Token)cache; - } - result = new Token(); - references[key] = (object)result; - result.RefreshTokenExpirationDate = ((Func)((DateTime? dateTime__1) => //DateTime - (dateTime__1 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__1)) - .Invoke( - (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : - (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_Token_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)(( - AuthResultDto authResultDto_0, - Token token_1) => //Token -{ - MapContextScope scope = null; - if (authResultDto_0 == (AuthResultDto)null) - { - return (Token)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - Token result = null; - references = scope.Context.References; - key = new ReferenceTuple( - authResultDto_0, - typeof(Token)); - if (references.TryGetValue( - key, - out cache)) - { - return (Token)cache; - } - result = token_1 ?? new Token(); - references[key] = (object)result; - result.RefreshTokenExpirationDate = ((Func)(( - DateTime? dateTime__2, - DateTime dateTime_3) => //DateTime - (dateTime__2 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__2)) - .Invoke( - (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : - (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime, - result.RefreshTokenExpirationDate); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_Token_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((ExportInfoModel exportInfoModel_0) => //ExportInfoDto -{ - MapContextScope scope = null; - if (exportInfoModel_0 == (ExportInfoModel)null) - { - return (ExportInfoDto)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - ExportInfoDto result = null; - references = scope.Context.References; - key = new ReferenceTuple( - exportInfoModel_0, - typeof(ExportInfoDto)); - if (references.TryGetValue( - key, - out cache)) - { - return (ExportInfoDto)cache; - } - result = new ExportInfoDto(TypeAdapter[], long[]>.Map.Invoke(exportInfoModel_0.Locations)); - references[key] = (object)result; - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_ExportInfoDto_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)(( - ExportInfoModel exportInfoModel_0, - ExportInfoDto exportInfoDto_1) => //ExportInfoDto -{ - MapContextScope scope = null; - if (exportInfoModel_0 == (ExportInfoModel)null) - { - return (ExportInfoDto)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - ExportInfoDto result = null; - references = scope.Context.References; - key = new ReferenceTuple( - exportInfoModel_0, - typeof(ExportInfoDto)); - if (references.TryGetValue( - key, - out cache)) - { - return (ExportInfoDto)cache; - } - result = new ExportInfoDto(TypeAdapter[], long[]>.Map.Invoke(exportInfoModel_0.Locations)); - references[key] = (object)result; - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_ExportInfoDto_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((TestClass testClass_0) => //TestEnum - (testClass_0 == (TestClass)null) ? (TestEnum)0 : - new TestEnum() - { - value__ = ((testClass_0.Type == 1) ? TestEnum.A : - (testClass_0.Type == 2) ? TestEnum.B : - (testClass_0.Type == 3) ? TestEnum.C : TestEnum.D).value__ - }); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)(( - TestClass testClass_0, - TestEnum testEnum_1) => //TestEnum -{ - TestEnum result = default; - if (testClass_0 == (TestClass)null) - { - return (TestEnum)0; - } - result = testEnum_1; - result.value__ = ((testClass_0.Type == 1) ? TestEnum.A : - (testClass_0.Type == 2) ? TestEnum.B : - (testClass_0.Type == 3) ? TestEnum.C : TestEnum.D).value__; - return result; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)((ResultAgent resultAgent_0) => //AgentStatusDto -{ - MapContextScope scope = null; - if (resultAgent_0 == (ResultAgent)null) - { - return (AgentStatusDto)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - AgentStatusDto result = null; - references = scope.Context.References; - key = new ReferenceTuple( - resultAgent_0, - typeof(AgentStatusDto)); - if (references.TryGetValue( - key, - out cache)) - { - return (AgentStatusDto)cache; - } - result = new AgentStatusDto(); - references[key] = (object)result; - result.ErrorCode = ((Func)((int? int__1) => //int - (int__1 == (int?)null) ? 0 : (int)int__1)) - .Invoke( - (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : - (int?)resultAgent_0.Common.Code); - result.CompleteTaskType = ((Func)((int? int__2) => //int - (int__2 == (int?)null) ? 0 : (int)int__2)) - .Invoke( - (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : - (int?)resultAgent_0.Common.TaskType); - default(Action)/*NOTE: Provide the non-default value for the Constant!*/.Invoke( - resultAgent_0, - result); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_AgentStatusDto_0:; -}); - -//Issue390_405_406_Mapster_tests.Run -var _ = (Func)(( - ResultAgent resultAgent_0, - AgentStatusDto agentStatusDto_1) => //AgentStatusDto -{ - MapContextScope scope = null; - if (resultAgent_0 == (ResultAgent)null) - { - return (AgentStatusDto)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - AgentStatusDto result = null; - references = scope.Context.References; - key = new ReferenceTuple( - resultAgent_0, - typeof(AgentStatusDto)); - if (references.TryGetValue( - key, - out cache)) - { - return (AgentStatusDto)cache; - } - result = agentStatusDto_1 ?? new AgentStatusDto(); - references[key] = (object)result; - result.ErrorCode = ((Func)(( - int? int__2, - int int_3) => //int - (int__2 == (int?)null) ? 0 : (int)int__2)) - .Invoke( - (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : - (int?)resultAgent_0.Common.Code, - result.ErrorCode); - result.CompleteTaskType = ((Func)(( - int? int__4, - int int_5) => //int - (int__4 == (int?)null) ? 0 : (int)int__4)) - .Invoke( - (resultAgent_0.Common == (ResponseAgent)null) ? (int?)null : - (int?)resultAgent_0.Common.TaskType, - result.CompleteTaskType); - default(Action)/*NOTE: Provide the non-default value for the Constant!*/.Invoke( - resultAgent_0, - result); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_AgentStatusDto_0:; -}); - -//Issue390_405_406_Mapster_tests.Issue390_Test_extracted_small_mapping_code -var _ = (Func)((AuthResultDto authResultDto_0) => //Token -{ - MapContextScope scope = null; - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - Token result = null; - references = scope.Context.References; - key = new ReferenceTuple( - authResultDto_0, - typeof(Token)); - result = new Token(); - references[key] = (object)result; - result.RefreshTokenExpirationDate = ((Func)((DateTime? dateTime__1) => //DateTime - (dateTime__1 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__1)) - .Invoke( - (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : - (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_Token_0:; -}); - -//Issue390_405_406_Mapster_tests.Issue390_Test_extracted_small_just_mapping_code_No_issue -var _ = (Func)((AuthResultDto authResultDto_0) => //DateTime - ((Func)((DateTime? dateTime__1) => //DateTime - (dateTime__1 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__1)) - .Invoke( - (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : - (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime)); - -//Issue390_405_406_Mapster_tests.Issue390_Test_extracted_mapping_code -var _ = (Func)((AuthResultDto authResultDto_0) => //Token -{ - MapContextScope scope = null; - if (authResultDto_0 == (AuthResultDto)null) - { - return (Token)null; - } - scope = new MapContextScope(); - try - { - object cache = null; - Dictionary references = null; - ReferenceTuple key = default; - Token result = null; - references = scope.Context.References; - key = new ReferenceTuple( - authResultDto_0, - typeof(Token)); - if (references.TryGetValue( - key, - out cache)) - { - return (Token)cache; - } - result = new Token(); - references[key] = (object)result; - result.RefreshTokenExpirationDate = ((Func)((DateTime? dateTime__1) => //DateTime - (dateTime__1 == (DateTime?)null) ? DateTime.Parse("1/1/0001 12:00:00 AM") : (DateTime)dateTime__1)) - .Invoke( - (authResultDto_0.RefreshToken == (RefreshTokenDto)null) ? (DateTime?)null : - (DateTime?)authResultDto_0.RefreshToken.ExpirationDate.LocalDateTime); - return result; - } - finally - { - scope.Dispose(); - } - issue390_405_406_Mapster_tests_Token_0:; -}); - -//Issue400_Fix_the_direct_assignment_of_Try_to_Member.Test_original -T __f(System.Func f) => f(); -var _ = (Func)(( - ModelSubObject source, - DtoSubObject destination, - ResolutionContext context) => //DtoSubObject - (source == null) ? - (destination == null) ? (DtoSubObject)null : destination : - __f(() => { - DtoSubObject typeMapDestination = null; - typeMapDestination = destination ?? new DtoSubObject(); - try - { - typeMapDestination.SubString = source.SubString; - } - catch (Exception ex) - { - throw TypeMapPlanBuilder.MemberMappingError( - ex, - null); - } - try - { - typeMapDestination.BaseString = - __f(() => { - try - { - return source.DifferentBaseString; - } - catch (NullReferenceException) - { - return (string)null; - } - catch (ArgumentNullException) - { - return (string)null; - } - }) ?? "12345"; - } - catch (Exception ex) - { - throw TypeMapPlanBuilder.MemberMappingError( - ex, - null); - } - return typeMapDestination; - })); - -//Issue400_Fix_the_direct_assignment_of_Try_to_Member.Test_original -T __f(System.Func f) => f(); -var _ = (Func)(( - ModelSubObject source, - DtoSubObject destination, - ResolutionContext context) => //DtoSubObject - (source == null) ? - (destination == null) ? (DtoSubObject)null : destination : - __f(() => { - DtoSubObject typeMapDestination = null; - typeMapDestination = destination ?? new DtoSubObject(); - try - { - typeMapDestination.SubString = source.SubString; - } - catch (Exception ex) - { - throw TypeMapPlanBuilder.MemberMappingError( - ex, - null); - } - try - { - typeMapDestination.BaseString = - __f(() => { - try - { - return source.DifferentBaseString; - } - catch (NullReferenceException) - { - return (string)null; - } - catch (ArgumentNullException) - { - return (string)null; - } - }) ?? "12345"; - } - catch (Exception ex) - { - throw TypeMapPlanBuilder.MemberMappingError( - ex, - null); - } - return typeMapDestination; - })); - -//Issue404_An_expression_with_a_single_parameter_concatenated_to_a_string_causes_Exception.Test1 -var _ = (Func)((double double_0) => //string - string.Concat( - "The value is ", - (((double?)double_0) == null) ? "" : - double_0.ToString())); - -//Issue404_An_expression_with_a_single_parameter_concatenated_to_a_string_causes_Exception.Test1 -var _ = (Func)((double double_0) => //string - string.Concat( - "The value is ", - (((double?)double_0) == null) ? "" : - double_0.ToString())); - -//Issue408_Dictionary_mapping_failing_when_the_InvocationExpression_inlining_is_involved.AutoMapper_UnitTests_When_mapping_to_a_generic_dictionary_with_mapped_value_pairs -T __f(System.Func f) => f(); -var _ = (Func)(( - Source source, - Destination destination, - ResolutionContext context) => //Destination - (source == null) ? - (destination == null) ? (Destination)null : destination : - __f(() => { - Destination typeMapDestination = null; - typeMapDestination = destination ?? new Destination(); - try - { - Dictionary resolvedValue = null; - Dictionary mappedValue = null; - resolvedValue = source.Values; - mappedValue = (resolvedValue == null) ? - new Dictionary() : - __f(() => { - Dictionary collectionDestination = null; - Dictionary passedDestination = null; - passedDestination = (destination == null) ? (Dictionary)null : - typeMapDestination.Values; - collectionDestination = passedDestination ?? new Dictionary(); - collectionDestination.Clear(); - Enumerator enumerator = default; - KeyValuePair item = default; - enumerator = resolvedValue.GetEnumerator(); - try - { - while (true) - { - if (enumerator.MoveNext()) - { - item = enumerator.Current; - collectionDestination.Add(new KeyValuePair( - item.Key, - ((Func)(( - SourceValue source_1, - DestinationValue destination_1, - ResolutionContext context) => //DestinationValue - (source_1 == null) ? - (destination_1 == null) ? (DestinationValue)null : destination_1 : - __f(() => { - DestinationValue typeMapDestination_1 = null; - typeMapDestination_1 = destination_1 ?? new DestinationValue(); - try - { - typeMapDestination_1.Value = source_1.Value; - } - catch (Exception ex) - { - throw TypeMapPlanBuilder.MemberMappingError( - ex, - default(PropertyMap)/*NOTE: Provide the non-default value for the Constant!*/); - } - return typeMapDestination_1; - }))) - .Invoke( - item.Value, - (DestinationValue)null, - context))); - } - else - { - goto LoopBreak; - } - } - LoopBreak:; - } - finally - { - enumerator.Dispose(); - } - return collectionDestination; - }); - return typeMapDestination.Values = mappedValue; - } - catch (Exception ex) - { - throw TypeMapPlanBuilder.MemberMappingError( - ex, - default(PropertyMap)/*NOTE: Provide the non-default value for the Constant!*/); - } - return typeMapDestination; - })); - -//Issue408_Dictionary_mapping_failing_when_the_InvocationExpression_inlining_is_involved.AutoMapper_UnitTests_When_mapping_to_a_generic_dictionary_with_mapped_value_pairs -T __f(System.Func f) => f(); -var _ = (Func)(( - Source source, - Destination destination, - ResolutionContext context) => //Destination - (source == null) ? - (destination == null) ? (Destination)null : destination : - __f(() => { - Destination typeMapDestination = null; - typeMapDestination = destination ?? new Destination(); - try - { - Dictionary resolvedValue = null; - Dictionary mappedValue = null; - resolvedValue = source.Values; - mappedValue = (resolvedValue == null) ? - new Dictionary() : - __f(() => { - Dictionary collectionDestination = null; - Dictionary passedDestination = null; - passedDestination = (destination == null) ? (Dictionary)null : - typeMapDestination.Values; - collectionDestination = passedDestination ?? new Dictionary(); - collectionDestination.Clear(); - Enumerator enumerator = default; - KeyValuePair item = default; - enumerator = resolvedValue.GetEnumerator(); - try - { - while (true) - { - if (enumerator.MoveNext()) - { - item = enumerator.Current; - collectionDestination.Add(new KeyValuePair( - item.Key, - ((Func)(( - SourceValue source_1, - DestinationValue destination_1, - ResolutionContext context) => //DestinationValue - (source_1 == null) ? - (destination_1 == null) ? (DestinationValue)null : destination_1 : - __f(() => { - DestinationValue typeMapDestination_1 = null; - typeMapDestination_1 = destination_1 ?? new DestinationValue(); - try - { - typeMapDestination_1.Value = source_1.Value; - } - catch (Exception ex) - { - throw TypeMapPlanBuilder.MemberMappingError( - ex, - default(PropertyMap)/*NOTE: Provide the non-default value for the Constant!*/); - } - return typeMapDestination_1; - }))) - .Invoke( - item.Value, - (DestinationValue)null, - context))); - } - else - { - goto LoopBreak; - } - } - LoopBreak:; - } - finally - { - enumerator.Dispose(); - } - return collectionDestination; - }); - return typeMapDestination.Values = mappedValue; - } - catch (Exception ex) - { - throw TypeMapPlanBuilder.MemberMappingError( - ex, - default(PropertyMap)/*NOTE: Provide the non-default value for the Constant!*/); - } - return typeMapDestination; - })); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue413_ParameterStructIndexer -var _ = (MyDelegateStruct)((MyStruct myStruct_0) => //int - myStruct_0[1]); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue413_VariableStructIndexer -var _ = (MyDelegateNoArgs)(() => //int -{ - MyStruct myStruct_0 = default; - myStruct_0 = new MyStruct(); - return myStruct_0[1]; -}); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue414_ReturnRefParameter -var _ = (MyDelegate)((ref int int_0) => //int - int_0); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue414_PassByRefParameter -var _ = (MyDelegate)((ref int int_0) => //int -{ - Issue414_Incorrect_il_when_passing_by_ref_value.IncRef(ref int_0); - return int_0; -}); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue413_ParameterStructIndexer -var _ = (MyDelegateStruct)((MyStruct myStruct_0) => //int - myStruct_0[1]); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue413_VariableStructIndexer -var _ = (MyDelegateNoArgs)(() => //int -{ - MyStruct myStruct_0 = default; - myStruct_0 = new MyStruct(); - return myStruct_0[1]; -}); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue414_ReturnRefParameter -var _ = (MyDelegate)((ref int int_0) => //int - int_0); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue414_PassByRefParameter -var _ = (MyDelegate)((ref int int_0) => //int -{ - Issue414_Incorrect_il_when_passing_by_ref_value.IncRef(ref int_0); - return int_0; -}); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue414_PassByRefVariable -var _ = (MyDelegateNoPars)(() => //int -{ - int __discard_init_by_ref = default; ref var int_0 = ref __discard_init_by_ref; - int_0 = 17; - Issue414_Incorrect_il_when_passing_by_ref_value.IncRef(ref int_0); - return int_0; -}); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue415_ReturnRefParameterByRef -var _ = (MyDelegateByRef)((ref int int_0) => //Int32 - ref int_0); - -//Issue414_Incorrect_il_when_passing_by_ref_value.Issue415_ReturnRefParameterByRef_ReturnRefCall -var _ = (MyDelegateByRef)((ref int int_0) => //Int32 - ref Issue414_Incorrect_il_when_passing_by_ref_value.ReturnRef(ref int_0)); - -//Issue418_Wrong_output_when_comparing_NaN_value.Original_case -var _ = (Func)((double double_0) => //bool - double_0 >= 0); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_int -var _ = (Func)((int int_0) => //bool - int_0 >= 0); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_Uint -var _ = (Func)((uint uint_0) => //bool - uint_0 >= (uint)0); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_less_then -var _ = (Func)((double double_0) => //bool - double_0 < 0); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_one -var _ = (Func)((double double_0) => //bool - double_0 >= 1); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_Minus_one -var _ = (Func)((double double_0) => //bool - double_0 >= -1); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_lte_instead_of_gte -var _ = (Func)((double double_0) => //bool - double_0 <= 0); - -//Issue418_Wrong_output_when_comparing_NaN_value.Original_case -var _ = (Func)((double double_0) => //bool - double_0 >= 0); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_int -var _ = (Func)((int int_0) => //bool - int_0 >= 0); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_Uint -var _ = (Func)((uint uint_0) => //bool - uint_0 >= (uint)0); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_less_then -var _ = (Func)((double double_0) => //bool - double_0 < 0); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_one -var _ = (Func)((double double_0) => //bool - double_0 >= 1); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_Minus_one -var _ = (Func)((double double_0) => //bool - double_0 >= -1); - -//Issue418_Wrong_output_when_comparing_NaN_value.Case_with_lte_instead_of_gte -var _ = (Func)((double double_0) => //bool - double_0 <= 0); - -//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Original_Case_1 -var _ = (Func)((Obj d) => //bool - ((d == null) ? (double?)null : - d.X) > (((double?)3) * ((((d == null) ? (Nested)null : - d.Nested) == null) ? (double?)null : - d.Nested.Y))); - -//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_Simplified_less -var _ = (Func)((Obj d) => //bool - ((d == null) ? (double?)null : - d.X) > (((double?)3) * ((d.Nested == null) ? (double?)null : - d.Nested.Y))); - -//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_simplified -var _ = (Func)((Obj d) => //bool - ((d == null) ? (double?)null : - d.X) > ((double?)3)); - -//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_Simplified_less_reversed_mul_args -var _ = (Func)((Obj d) => //bool - ((d == null) ? (double?)null : - d.X) > (((d.Nested == null) ? (double?)null : - d.Nested.Y) * ((double?)3))); - -//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Original_Case_2 -var _ = (RefFunc)((in Obj p) => //bool - ((p == null) ? (double?)null : - p.X) > (((double?)2) * ((((p == null) ? (Nested)null : - p.Nested) == null) ? (double?)null : - ((p == null) ? (Nested)null : - p.Nested).Y))); - -//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Original_Case_1 -var _ = (Func)((Obj d) => //bool - ((d == null) ? (double?)null : - d.X) > (((double?)3) * ((((d == null) ? (Nested)null : - d.Nested) == null) ? (double?)null : - d.Nested.Y))); - -//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_Simplified_less -var _ = (Func)((Obj d) => //bool - ((d == null) ? (double?)null : - d.X) > (((double?)3) * ((d.Nested == null) ? (double?)null : - d.Nested.Y))); - -//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_simplified -var _ = (Func)((Obj d) => //bool - ((d == null) ? (double?)null : - d.X) > ((double?)3)); - -//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Case_1_Simplified_less_reversed_mul_args -var _ = (Func)((Obj d) => //bool - ((d == null) ? (double?)null : - d.X) > (((d.Nested == null) ? (double?)null : - d.Nested.Y) * ((double?)3))); - -//Issue419_The_JIT_compiler_encountered_invalid_IL_code_or_an_internal_limitation.Original_Case_2 -var _ = (RefFunc)((in Obj p) => //bool - ((p == null) ? (double?)null : - p.X) > (((double?)2) * ((((p == null) ? (Nested)null : - p.Nested) == null) ? (double?)null : - ((p == null) ? (Nested)null : - p.Nested).Y))); - -//Issue420_Nullable_DateTime_comparison_differs_from_Expression_Compile.Original_case -var _ = (Func)((HasDateTime HasDateTime) => //bool - HasDateTime.T == (DateTime?)DateTime.Parse("4/13/2026 7:15:20 PM")); - -//Issue420_Nullable_DateTime_comparison_differs_from_Expression_Compile.Original_case -var _ = (Func)((HasDateTime HasDateTime) => //bool - HasDateTime.T == (DateTime?)DateTime.Parse("4/13/2026 7:15:20 PM")); - -//Issue421_Date_difference_is_giving_wrong_negative_value.Original_case_2 -var _ = (Func)(() => //double - (DateTime.Now.Date - default(c__DisplayClass3_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.contract.StartDate.Date).TotalDays); - -//Issue421_Date_difference_is_giving_wrong_negative_value.Original_case_1 -var _ = (Func)(() => //double - (DateTime.Now - default(c__DisplayClass2_0)/*NOTE: Provide the non-default value for the Constant of compiler-generated type!*/.contract.StartDate).TotalDays); - -//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case_but_comparing_with_non_null_left_operand -T __f(System.Func f) => f(); -var _ = (Func, bool>)((Tuple tuple_object__0) => //bool - left == - __f(() => { - try - { - return tuple_object__0.Item1; - } - catch (NullReferenceException) - { - return null; - } - })); - -//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case -T __f(System.Func f) => f(); -var _ = (Func, bool>)((Tuple tuple_object__0) => //bool - null == - __f(() => { - try - { - return tuple_object__0.Item1; - } - catch (NullReferenceException) - { - return null; - } - })); - -//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case_but_comparing_with_nullable_left_operand -T __f(System.Func f) => f(); -var _ = (Func, bool>)((Tuple tuple_DateTime___0) => //bool - (DateTime?)DateTime.Parse("12/31/9999 11:59:59 PM") == - __f(() => { - try - { - return tuple_DateTime___0.Item1; - } - catch (NullReferenceException) - { - return (DateTime?)DateTime.Parse("12/31/9999 11:59:59 PM"); - } - })); - -//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Change_comparison_operators_order_as_expected -T __f(System.Func f) => f(); -var _ = (Func, bool>)((Tuple tuple_object__0) => //bool - __f(() => { - try - { - return tuple_object__0.Item1; - } - catch (NullReferenceException) - { - return null; - } - }) == null); - -//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case_but_comparing_with_non_null_left_operand -T __f(System.Func f) => f(); -var _ = (Func, bool>)((Tuple tuple_object__0) => //bool - left == - __f(() => { - try - { - return tuple_object__0.Item1; - } - catch (NullReferenceException) - { - return null; - } - })); - -//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case -T __f(System.Func f) => f(); -var _ = (Func, bool>)((Tuple tuple_object__0) => //bool - null == - __f(() => { - try - { - return tuple_object__0.Item1; - } - catch (NullReferenceException) - { - return null; - } - })); - -//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Original_case_but_comparing_with_nullable_left_operand -T __f(System.Func f) => f(); -var _ = (Func, bool>)((Tuple tuple_DateTime___0) => //bool - (DateTime?)DateTime.Parse("12/31/9999 11:59:59 PM") == - __f(() => { - try - { - return tuple_DateTime___0.Item1; - } - catch (NullReferenceException) - { - return (DateTime?)DateTime.Parse("12/31/9999 11:59:59 PM"); - } - })); - -//Issue422_InvalidProgramException_when_having_TryCatch_Default_in_Catch.Change_comparison_operators_order_as_expected -T __f(System.Func f) => f(); -var _ = (Func, bool>)((Tuple tuple_object__0) => //bool - __f(() => { - try - { - return tuple_object__0.Item1; - } - catch (NullReferenceException) - { - return null; - } - }) == null); - -//Issue423_Converting_a_uint_to_a_float_gives_the_wrong_result.Original_case -var _ = (Func)((uint p) => //float - (float)p); - -//Issue423_Converting_a_uint_to_a_float_gives_the_wrong_result.Original_case -var _ = (Func)((uint p) => //float - (float)p); - -//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Two_ref_value_params_case -var _ = (Func)(() => //int - Numbers.AddTwoTwo( - ref Numbers.GetInt(), - ref Numbers.GetInt())); - -//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Original_case -var _ = (Func)(() => //int - Numbers.AddTwo(ref Numbers.GetInt())); - -//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Class_ref_param_case -var _ = (Func)(() => //string - Numbers.AckMessage(ref Numbers.GetMessage())); - -//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Two_ref_value_params_case -var _ = (Func)(() => //int - Numbers.AddTwoTwo( - ref Numbers.GetInt(), - ref Numbers.GetInt())); - -//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Original_case -var _ = (Func)(() => //int - Numbers.AddTwo(ref Numbers.GetInt())); - -//Issue426_Directly_passing_a_method_result_to_another_method_by_ref_fails_with_InvalidProgramException.Class_ref_param_case -var _ = (Func)(() => //string - Numbers.AckMessage(ref Numbers.GetMessage())); - -//Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.Original_case -var _ = (Action)((int n) => //void -{ - switch (n) - { - case 1: - Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.AddCase("1"); - break; - case 2: - Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.AddCase("2"); - break; - }; -}); - -//Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.Not_so_original_case -var _ = (Action)((int n) => //void -{ - switch (n) - { - case 1: - Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.DebugWriteCase( - "Case", - 1); - break; - case 2: - Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.DebugWriteCase( - "Case", - 2); - break; - }; -}); - -//Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.Original_case -var _ = (Action)((int n) => //void -{ - switch (n) - { - case 1: - Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.AddCase("1"); - break; - case 2: - Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.AddCase("2"); - break; - }; -}); - -//Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.Not_so_original_case -var _ = (Action)((int n) => //void -{ - switch (n) - { - case 1: - Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.DebugWriteCase( - "Case", - 1); - break; - case 2: - Issue428_Expression_Switch_without_a_default_case_incorrectly_calls_first_case_for_unmatched_values.DebugWriteCase( - "Case", - 2); - break; - }; -}); - -//Issue430_TryCatch_Bad_label_content_in_ILGenerator.Original_case -var _ = (Func)(() => //int -{ - try - { - Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); - return 1; - } - catch (Exception) - { - return 10; - } - Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); - return 5; -}); - -//Issue430_TryCatch_Bad_label_content_in_ILGenerator.Original_case -var _ = (Func)(() => //int -{ - try - { - Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); - return 1; - } - catch (Exception) - { - return 10; - } - Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); - return 5; -}); - -//Issue430_TryCatch_Bad_label_content_in_ILGenerator.Original_case -var _ = (Func)(() => //int -{ - try - { - Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); - return 1; - } - catch (Exception) - { - return 10; - } - Issue430_TryCatch_Bad_label_content_in_ILGenerator.DoSome(); - return 5; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining_for_SystemCompile_with_Execute_no_assigning -var _ = (Func)(() => //int -{ - int myVar = default; - myVar = 5; - _ = TestClass.ExecuteFunc((Func)(() => //int - myVar + 3)); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining_for_SystemCompile_with_Execute -var _ = (Func)(() => //int -{ - int myVar = default; - TestClass.ExecuteAction((Action)(() => //void - { - myVar = 3; - })); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining -var _ = (Func)(() => //int -{ - int myVar = default; - ((Action)(() => //void - { - myVar = 3; - })) - .Invoke(); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Simplified_test_no_inlining -var _ = (Func)(() => //int -{ - int myVar = default; - myVar = 5; - ((Action)(() => //void - { - myVar = 3; - })) - .Invoke(); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Simplified_test -var _ = (Func)(() => //int -{ - int myVar = default; - myVar = 5; - ((Action)(() => //void - { - myVar = 3; - })) - .Invoke(); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround_with_struct -var _ = (Action)((Action lambda) => //void -{ - lambda.Invoke(); -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround_with_struct -var _ = (Func>)(() => //Val -{ - Val myVar = null; - myVar = new Val() - { - Value = 5 - }; - ((Action)((Action lambda) => //void - { - lambda.Invoke(); - })) - .Invoke( - (Action)(() => //void - { - myVar.Value = 3; - })); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable -var _ = (Action)((Action lambda) => //void -{ - lambda.Invoke(); -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable -var _ = (Func)(() => //int -{ - int myVar = default; - myVar = 5; - ((Action)((Action lambda) => //void - { - lambda.Invoke(); - })) - .Invoke( - (Action)(() => //void - { - myVar = 3; - })); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround -var _ = (Action)((Action lambda) => //void -{ - lambda.Invoke(); -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround -var _ = (Func>)(() => //Box -{ - Box myVar = null; - myVar = new Box() - { - Value = 5 - }; - ((Action)((Action lambda) => //void - { - lambda.Invoke(); - })) - .Invoke( - (Action)(() => //void - { - myVar.Value = 3; - })); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining_for_SystemCompile_with_Execute_no_assigning -var _ = (Func)(() => //int -{ - int myVar = default; - myVar = 5; - _ = TestClass.ExecuteFunc((Func)(() => //int - myVar + 3)); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining_for_SystemCompile_with_Execute -var _ = (Func)(() => //int -{ - int myVar = default; - TestClass.ExecuteAction((Action)(() => //void - { - myVar = 3; - })); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.More_simplified_test_no_inlining -var _ = (Func)(() => //int -{ - int myVar = default; - ((Action)(() => //void - { - myVar = 3; - })) - .Invoke(); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Simplified_test_no_inlining -var _ = (Func)(() => //int -{ - int myVar = default; - myVar = 5; - ((Action)(() => //void - { - myVar = 3; - })) - .Invoke(); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Simplified_test -var _ = (Func)(() => //int -{ - int myVar = default; - myVar = 5; - ((Action)(() => //void - { - myVar = 3; - })) - .Invoke(); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround_with_struct -var _ = (Action)((Action lambda) => //void -{ - lambda.Invoke(); -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround_with_struct -var _ = (Func>)(() => //Val -{ - Val myVar = null; - myVar = new Val() - { - Value = 5 - }; - ((Action)((Action lambda) => //void - { - lambda.Invoke(); - })) - .Invoke( - (Action)(() => //void - { - myVar.Value = 3; - })); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable -var _ = (Action)((Action lambda) => //void -{ - lambda.Invoke(); -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable -var _ = (Func)(() => //int -{ - int myVar = default; - myVar = 5; - ((Action)((Action lambda) => //void - { - lambda.Invoke(); - })) - .Invoke( - (Action)(() => //void - { - myVar = 3; - })); - return myVar; -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround -var _ = (Action)((Action lambda) => //void -{ - lambda.Invoke(); -}); - -//Issue437_Shared_variables_with_nested_lambdas_returning_incorrect_values.Nested_lambda_with_shared_variable_Workaround -var _ = (Func>)(() => //Box -{ - Box myVar = null; - myVar = new Box() - { - Value = 5 - }; - ((Action)((Action lambda) => //void - { - lambda.Invoke(); - })) - .Invoke( - (Action)(() => //void - { - myVar.Value = 3; - })); - return myVar; -}); - -//Issue439_Support_unused_Field_access_in_Block.Original_case -var _ = (Func)(() => //int -{ - TestClass testClass = null; - testClass = new TestClass(); - testClass.Result0; - testClass.Result1 = testClass.Result0; - return testClass.Result1; -}); - -//Issue439_Support_unused_Field_access_in_Block.Original_case -var _ = (Func)(() => //int -{ - TestClass testClass = null; - testClass = new TestClass(); - testClass.Result0; - testClass.Result1 = testClass.Result0; - return testClass.Result1; -}); - -//Issue440_Errors_with_simplified_Switch_cases.Switch_with_single_case_without_default -var _ = (Func)(() => //int -{ - switch (1) - { - case 1: - goto after_switch; - break; - } - after_switch:; - return 2; -}); - -//Issue440_Errors_with_simplified_Switch_cases.Switch_with_no_cases_but_default -var _ = (Func)(() => //int -{ - switch (1) - { - default: - return 42; - } -}); - -//Issue440_Errors_with_simplified_Switch_cases.Switch_with_no_cases -var _ = (Func)(() => //int -{ - return 2; -}); - -//Issue440_Errors_with_simplified_Switch_cases.Switch_with_single_case_without_default -var _ = (Func)(() => //int -{ - switch (1) - { - case 1: - goto after_switch; - break; - } - after_switch:; - return 2; -}); - -//Issue440_Errors_with_simplified_Switch_cases.Switch_with_no_cases_but_default -var _ = (Func)(() => //int -{ - switch (1) - { - default: - return 42; - } -}); - -//Issue440_Errors_with_simplified_Switch_cases.Switch_with_no_cases -var _ = (Func)(() => //int -{ - return 2; -}); - -//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Original_case -var _ = (Func)(() => //int -{ - return TestClass.MethodThatTakesARefInt(42); -}); - -//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Case_with_string -var _ = (Func)(() => //int -{ - return TestClass.MethodThatTakesARefString("42"); -}); - -//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Case_with_nullable -var _ = (Func)(() => //int -{ - return TestClass.MethodThatTakesARefNullable((int?)null); -}); - -//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Original_case -var _ = (Func)(() => //int -{ - return TestClass.MethodThatTakesARefInt(42); -}); - -//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Case_with_string -var _ = (Func)(() => //int -{ - return TestClass.MethodThatTakesARefString("42"); -}); - -//Issue441_Fails_to_pass_Constant_as_call_parameter_by_reference.Case_with_nullable -var _ = (Func)(() => //int -{ - return TestClass.MethodThatTakesARefNullable((int?)null); -}); - -//Issue442_TryCatch_and_the_Goto_outside_problems.Original_case_2 -var _ = (Func)(() => //int -{ - int int_0 = default; - try - { - goto label; - throw default(Exception)/*NOTE: Provide the non-default value for the Constant!*/; - label:; - return int_0 = 2; - } - catch (Exception ex) - { - int_0 = 50; - } - return int_0; -}); - -//Issue442_TryCatch_and_the_Goto_outside_problems.Original_case_1 -var _ = (Func)(() => //int -{ - int variable = default; - try - { - variable = 5; - goto label; - } - catch (Exception) - { - variable = 10; - } - label:; - return variable; -}); - -//Issue442_TryCatch_and_the_Goto_outside_problems.Original_case_2 -var _ = (Func)(() => //int -{ - int int_0 = default; - try - { - goto label; - throw default(Exception)/*NOTE: Provide the non-default value for the Constant!*/; - label:; - return int_0 = 2; - } - catch (Exception ex) - { - int_0 = 50; - } - return int_0; -}); - -//Issue442_TryCatch_and_the_Goto_outside_problems.Original_case_1 -var _ = (Func)(() => //int -{ - int variable = default; - try - { - variable = 5; - goto label; - } - catch (Exception) - { - variable = 10; - } - label:; - return variable; -}); - -//Issue443_Nested_Calls_with_lambda_parameters.Original_case -var _ = (Func)(() => //int - TestClass.ExecuteDelegate((Func)(() => //int - { - int local = default; - local = 42; - return TestClass.ExecuteDelegate((Func)(() => //int - local)); - }))); - -//Issue443_Nested_Calls_with_lambda_parameters.Case_with_Invoke_NoInlining -var _ = (Func)(() => //int - TestClass.ExecuteDelegate((Func)(() => //int - { - int local = default; - local = 42; - return ((Func)(() => //int - local)) - .Invoke(); - }))); - -//Issue443_Nested_Calls_with_lambda_parameters.Case_with_Invoke -var _ = (Func)(() => //int - TestClass.ExecuteDelegate((Func)(() => //int - { - int local = default; - local = 42; - return ((Func)(() => //int - local)) - .Invoke(); - }))); - -//Issue443_Nested_Calls_with_lambda_parameters.Original_case -var _ = (Func)(() => //int - TestClass.ExecuteDelegate((Func)(() => //int - { - int local = default; - local = 42; - return TestClass.ExecuteDelegate((Func)(() => //int - local)); - }))); - -//Issue443_Nested_Calls_with_lambda_parameters.Case_with_Invoke_NoInlining -var _ = (Func)(() => //int - TestClass.ExecuteDelegate((Func)(() => //int - { - int local = default; - local = 42; - return ((Func)(() => //int - local)) - .Invoke(); - }))); - -//Issue443_Nested_Calls_with_lambda_parameters.Case_with_Invoke -var _ = (Func)(() => //int - TestClass.ExecuteDelegate((Func)(() => //int - { - int local = default; - local = 42; - return ((Func)(() => //int - local)) - .Invoke(); - }))); - -//Issue449_MemberInit_produces_InvalidProgram.Original_case -var _ = (Func)(() => //SampleType - new SampleType() - { - Value = (int?)666 - }); - -//Issue449_MemberInit_produces_InvalidProgram.Struct_without_ctor_case -var _ = (Func)(() => //SampleType_NoCtor - new SampleType_NoCtor() - { - Value = (int?)666 - }); - -//Issue449_MemberInit_produces_InvalidProgram.Original_case -var _ = (Func)(() => //SampleType - new SampleType() - { - Value = (int?)666 - }); - -//Issue449_MemberInit_produces_InvalidProgram.Struct_without_ctor_case -var _ = (Func)(() => //SampleType_NoCtor - new SampleType_NoCtor() - { - Value = (int?)666 - }); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.ConvertChecked_int_to_byte_enum -var _ = (Func)((int n) => //Hey - (Hey)n); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_int_to_byte_enum -var _ = (Func)((int n) => //Hey - (Hey)n); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_byte_to_enum -var _ = (Func)(() => //Hey - (Hey)(byte)5); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_byte_to_nullable_enum -var _ = (Func)(() => //Hey? - (Hey?)(byte)5); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_to_nullable_given_the_conv_op_of_underlying_to_underlying -var _ = (Func)(() => //Jazz? - (Jazz?)(int?)42); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_into_the_underlying_nullable_type -var _ = (Func)(() => //byte? - (byte?)(Hey?)Hey.Sailor); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_into_the_compatible_to_underlying_nullable_type -var _ = (Func)(() => //int? - (int?)(Hey?)Hey.Sailor); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_conv_op -var _ = (Func)(() => //Foo - (Foo)(Hey?)Hey.Sailor); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_Passed_conv_method -var _ = (Func)(() => //Foo - (Foo)(Hey?)Hey.Sailor); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_conv_op_with_nullable_param -var _ = (Func)(() => //Bar - (Bar)(Hey?)null); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Original_case -var _ = (Func)(() => //bool - (bool)new SampleType((bool?)null)); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Original_case -var _ = (Func)(() => //bool? - (bool?)new SampleType((bool?)null)); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.The_operator_method_is_provided_in_Convert -var _ = (Func)(() => //bool? - (bool?)new SampleType((bool?)null)); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.ConvertChecked_int_to_byte_enum -var _ = (Func)((int n) => //Hey - (Hey)n); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_int_to_byte_enum -var _ = (Func)((int n) => //Hey - (Hey)n); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_byte_to_enum -var _ = (Func)(() => //Hey - (Hey)(byte)5); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_byte_to_nullable_enum -var _ = (Func)(() => //Hey? - (Hey?)(byte)5); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_to_nullable_given_the_conv_op_of_underlying_to_underlying -var _ = (Func)(() => //Jazz? - (Jazz?)(int?)42); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_into_the_underlying_nullable_type -var _ = (Func)(() => //byte? - (byte?)(Hey?)Hey.Sailor); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_into_the_compatible_to_underlying_nullable_type -var _ = (Func)(() => //int? - (int?)(Hey?)Hey.Sailor); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_conv_op -var _ = (Func)(() => //Foo - (Foo)(Hey?)Hey.Sailor); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_Passed_conv_method -var _ = (Func)(() => //Foo - (Foo)(Hey?)Hey.Sailor); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Convert_nullable_enum_using_the_conv_op_with_nullable_param -var _ = (Func)(() => //Bar - (Bar)(Hey?)null); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Original_case -var _ = (Func)(() => //bool - (bool)new SampleType((bool?)null)); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.Original_case -var _ = (Func)(() => //bool? - (bool?)new SampleType((bool?)null)); - -//Issue451_Operator_implicit_explicit_produces_InvalidProgram.The_operator_method_is_provided_in_Convert -var _ = (Func)(() => //bool? - (bool?)new SampleType((bool?)null)); - -//Issue455_TypeAs_should_return_null.Original_case -var _ = (Func)(() => //int? -{ - int? x = null; - return x = (object)((long)12345) as int?; -}); - -//Issue455_TypeAs_should_return_null.Original_case -var _ = (Func)(() => //int? -{ - int? x = null; - return x = (object)((long)12345) as int?; -}); - -//Issue458_Support_TryFault.Original_case2 -var _ = (Func)(() => //int -{ - int x = default; - try - { - var fault = 0; // emulating try-fault - try - { - x = 1; - throw new Exception(); - } - catch (Exception) when (fault++ != 0) {} - finally - {if (fault != 0) { - x = 2; - }} - } - catch (Exception) - { - return -1; - } - return x; -}); - -//Issue458_Support_TryFault.Original_case1 -var _ = (Func)(() => //bool -{ - var fault = 0; // emulating try-fault - try - { - return true; - } - catch (Exception) when (fault++ != 0) {} - finally - {if (fault != 0) { - return false; - }} -}); - -//Issue458_Support_TryFault.Original_case2 -var _ = (Func)(() => //int -{ - int x = default; - try - { - var fault = 0; // emulating try-fault - try - { - x = 1; - throw new Exception(); - } - catch (Exception) when (fault++ != 0) {} - finally - {if (fault != 0) { - x = 2; - }} - } - catch (Exception) - { - return -1; - } - return x; -}); - -//Issue458_Support_TryFault.Original_case1 -var _ = (Func)(() => //bool -{ - var fault = 0; // emulating try-fault - try - { - return true; - } - catch (Exception) when (fault++ != 0) {} - finally - {if (fault != 0) { - return false; - }} -}); - -//Issue460_ArgumentException_when_converting_from_object_to_type_with_explicit_operator.Original_case1 -var _ = (Action)(( - object instance, - object parameter) => //void -{ - ((TestClass)instance).ClassProp = (TestClass2)parameter; -}); - -//Issue460_ArgumentException_when_converting_from_object_to_type_with_explicit_operator.Original_case1 -var _ = (Action)(( - object instance, - object parameter) => //void -{ - ((TestClass)instance).ClassProp = (TestClass2)parameter; -}); - -//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_equal_nullable_and_object_null -var _ = (InFunc)((in XX? xx) => //bool - xx == null); - -//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_equal_nullable_and_nullable_null_on_the_left -var _ = (InFunc)((in XX? xx) => //bool - (XX?)null != xx); - -//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_not_equal_nullable_decimal -var _ = (Func)((Decimal? d) => //bool - d != (Decimal?)null); - -//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Original_case -var _ = (InFunc)((in Target p) => //bool - p == null); - -//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Original_case_null_on_the_right -var _ = (InFunc)((in Target p) => //bool - null != p); - -//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_equal_nullable_and_object_null -var _ = (InFunc)((in XX? xx) => //bool - xx == null); - -//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_equal_nullable_and_nullable_null_on_the_left -var _ = (InFunc)((in XX? xx) => //bool - (XX?)null != xx); - -//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Case_not_equal_nullable_decimal -var _ = (Func)((Decimal? d) => //bool - d != (Decimal?)null); - -//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Original_case -var _ = (InFunc)((in Target p) => //bool - p == null); - -//Issue461_InvalidProgramException_when_null_checking_type_by_ref.Original_case_null_on_the_right -var _ = (InFunc)((in Target p) => //bool - null != p); - -// IssueTests are passing in 1459 ms. - -// ALL 1655 tests are passing in 1459 ms. From f21739edb820816114a269a3598cc86137d5c021 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 05:38:01 +0000 Subject: [PATCH 7/7] Replace unicode arrows and dashes with ASCII equivalents in comments Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/64a0b1bf-37ac-4116-855a-afd02551f9d9 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com> --- .../FastExpressionCompiler.cs | 4 ++-- .../Issue489_Switch_BranchElimination.cs | 10 +++++----- ...d_logical_expressions_during_the_compilation.cs | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/FastExpressionCompiler/FastExpressionCompiler.cs b/src/FastExpressionCompiler/FastExpressionCompiler.cs index 7eee9afb..679e1ff4 100644 --- a/src/FastExpressionCompiler/FastExpressionCompiler.cs +++ b/src/FastExpressionCompiler/FastExpressionCompiler.cs @@ -1470,7 +1470,7 @@ public static Result TryCollectInfo(ref CompilerContext context, Expression expr expr = switchMatchedBody; continue; } - return r; // no matched body and no default → nothing to collect + return r; // no matched body and no default -> nothing to collect } if ((r = TryCollectInfo(ref context, switchExpr.SwitchValue, nestedLambda, ref rootNestedLambdas)) != Result.OK || switchExpr.DefaultBody != null && // todo: @check is the order of collection affects the result? @@ -2070,7 +2070,7 @@ public static bool TryEmit(Expression expr, ILGenerator il, ref CompilerContext expr = testIsTrue ? condExpr.IfTrue : condExpr.IfFalse; continue; // no recursion, just continue with the left or right side of condition } - // Try structural branch elimination (e.g., null == Default(X) → always true/false) + // Try structural branch elimination (e.g., null == Default(X) -> always true/false) { var reducedCond = Tools.TryReduceConditional(condExpr); if (!ReferenceEquals(reducedCond, condExpr)) diff --git a/test/FastExpressionCompiler.Benchmarks/Issue489_Switch_BranchElimination.cs b/test/FastExpressionCompiler.Benchmarks/Issue489_Switch_BranchElimination.cs index 92f45dba..3b617218 100644 --- a/test/FastExpressionCompiler.Benchmarks/Issue489_Switch_BranchElimination.cs +++ b/test/FastExpressionCompiler.Benchmarks/Issue489_Switch_BranchElimination.cs @@ -9,8 +9,8 @@ namespace FastExpressionCompiler.Benchmarks; /// Benchmarks for compile-time switch branch elimination introduced in #489. /// /// Two variants are compared: -/// - Baseline: Switch value is a runtime parameter — FEC cannot eliminate any branches. -/// - Eliminated: Switch value is a compile-time constant — FEC selects the single matching +/// - Baseline: Switch value is a runtime parameter - FEC cannot eliminate any branches. +/// - Eliminated: Switch value is a compile-time constant - FEC selects the single matching /// branch and emits only that, skipping closure collection and IL for all others. /// /// Each variant has two nested classes: @@ -27,7 +27,7 @@ public class Issue489_Switch_BranchElimination // ----------------------------------------------------------------- /// - /// Baseline: the switch value is a runtime parameter — no elimination possible. + /// Baseline: the switch value is a runtime parameter - no elimination possible. /// switch (x) { case 1: "A"; case 2: "B"; case 5: "C"; default: "Z" } /// private static Expression> CreateExpr_Baseline() @@ -70,7 +70,7 @@ private static Expression> CreateExpr_Eliminated() public class Compile { /* - ## Results placeholder — run with: dotnet run -c Release --project test/FastExpressionCompiler.Benchmarks -- --filter *Issue489*Compile* + ## Results placeholder - run with: dotnet run -c Release --project test/FastExpressionCompiler.Benchmarks -- --filter *Issue489*Compile* | Method | Mean | Error | StdDev | Ratio | Rank | Allocated | |----------------------------- |----------:|---------:|---------:|------:|-----:|----------:| @@ -109,7 +109,7 @@ public class Compile public class Invoke { /* - ## Results placeholder — run with: dotnet run -c Release --project test/FastExpressionCompiler.Benchmarks -- --filter *Issue489*Invoke* + ## Results placeholder - run with: dotnet run -c Release --project test/FastExpressionCompiler.Benchmarks -- --filter *Issue489*Invoke* | Method | Mean | Error | StdDev | Ratio | Rank | Allocated | |-------------------------------- |-----:|------:|-------:|------:|-----:|----------:| diff --git a/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs b/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs index e8a8dc54..3675ae86 100644 --- a/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs +++ b/test/FastExpressionCompiler.IssueTests/Issue472_TryInterpret_and_Reduce_primitive_arithmetic_and_logical_expressions_during_the_compilation.cs @@ -70,7 +70,7 @@ public void Logical_expression_started_with_not_Without_Interpreter_due_param_us t.IsTrue(ff(false)); } - // Branch elimination: Constant(null) == Default(typeof(X)) where X is a class → always true + // Branch elimination: Constant(null) == Default(typeof(X)) where X is a class -> always true // Models the AutoMapper pattern: after inlining a null argument into a null-check lambda public void Condition_with_null_constant_equal_to_default_of_class_type_is_eliminated(TestContext t) { @@ -93,7 +93,7 @@ public void Condition_with_null_constant_equal_to_default_of_class_type_is_elimi t.AreEqual("trueBranch", ff()); } - // Branch elimination: Default(typeof(X)) == Constant(null) where X is a class → always true (symmetric) + // Branch elimination: Default(typeof(X)) == Constant(null) where X is a class -> always true (symmetric) public void Condition_with_default_class_type_equal_to_null_constant_is_eliminated(TestContext t) { var expr = Lambda>( @@ -113,7 +113,7 @@ public void Condition_with_default_class_type_equal_to_null_constant_is_eliminat t.AreEqual("trueBranch", ff()); } - // Branch elimination: Default(typeof(X)) == Default(typeof(X)) where X is a class → always true + // Branch elimination: Default(typeof(X)) == Default(typeof(X)) where X is a class -> always true public void Condition_with_two_defaults_of_class_type_is_eliminated(TestContext t) { var expr = Lambda>( @@ -133,7 +133,7 @@ public void Condition_with_two_defaults_of_class_type_is_eliminated(TestContext t.AreEqual("trueBranch", ff()); } - // Branch elimination: Constant(null) != Default(typeof(X)) where X is a class → always false + // Branch elimination: Constant(null) != Default(typeof(X)) where X is a class -> always false public void Condition_with_not_equal_null_and_default_of_class_type_is_eliminated(TestContext t) { var expr = Lambda>( @@ -153,7 +153,7 @@ public void Condition_with_not_equal_null_and_default_of_class_type_is_eliminate t.AreEqual("falseBranch", ff()); } - // Branch elimination: Constant(null) == Default(typeof(int?)) → always true (null == default(int?) is null == null) + // Branch elimination: Constant(null) == Default(typeof(int?)) -> always true (null == default(int?) is null == null) public void Condition_with_nullable_default_equal_to_null_is_eliminated(TestContext t) { var expr = Lambda>( @@ -259,7 +259,7 @@ public void Switch_with_constant_enum_value_eliminates_dead_cases(TestContext t) t.AreEqual("green", ff()); } - // Switch branch elimination (#489): constant int matches no case → default is emitted + // Switch branch elimination (#489): constant int matches no case -> default is emitted public void Switch_with_constant_int_matching_no_case_falls_through_to_default(TestContext t) { var expr = Lambda>( @@ -282,7 +282,7 @@ public void Switch_with_constant_int_matching_no_case_falls_through_to_default(T // Switch branch elimination (#489): computed int (arithmetic on constants) selects case public void Switch_with_interpreted_int_expression_eliminates_dead_cases(TestContext t) { - // Switch(1 + 4, ...) → Switch(5, ...) → "C" + // Switch(1 + 4, ...) -> Switch(5, ...) -> "C" var expr = Lambda>( Switch(Add(Constant(1), Constant(4)), Constant("Z"),
)(() => //DD - new DD( - ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))), - ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))); - -//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions -var _ = (Func)(() => //A - new A( - ((B)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 0, - (Func)(() => //B - new B( - ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //C - new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))), - ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))), - ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //C - new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))))); - -//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions_with_3_dublicate_D -var _ = (Func)(() => //A1 - new A1( - ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))), - ((B)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 0, - (Func)(() => //B - new B( - ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //C - new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))), - ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))), - ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 1, - (Func)(() => //C - new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( - 2, - (Func)(() => //D - new D()))))))))); - -//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions_with_non_passed_params_in_closure -var _ = (Func)(( - Name d1Name, - Name c1Name, - Name b1Name) => //A2 - new A2( - ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 2, - (Func)(() => //D1 - new D1(d1Name)))), - ((C1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 1, - (Func)(() => //C1 - new C1( - ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 2, - (Func)(() => //D1 - new D1(d1Name)))), - c1Name)))), - ((B1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 0, - (Func)(() => //B1 - new B1( - ((C1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 1, - (Func)(() => //C1 - new C1( - ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 2, - (Func)(() => //D1 - new D1(d1Name)))), - c1Name)))), - b1Name, - ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( - 2, - (Func)(() => //D1 - new D1(d1Name)))))))))); - -//Nested_lambdas_assigned_to_vars.Test_2_shared_lambdas_on_the_same_level -var _ = (Func
)(() => //DD + new DD( + ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))), + ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))); + +//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions +var _ = (Func)(() => //A + new A( + ((B)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 0, + (Func)(() => //B + new B( + ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //C + new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))), + ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))), + ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //C + new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))))); + +//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions_with_3_dublicate_D +var _ = (Func)(() => //A1 + new A1( + ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))), + ((B)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 0, + (Func)(() => //B + new B( + ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //C + new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))), + ((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))), + ((C)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 1, + (Func)(() => //C + new C(((D)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrAdd( + 2, + (Func)(() => //D + new D()))))))))); + +//Nested_lambdas_assigned_to_vars.Test_shared_sub_expressions_with_non_passed_params_in_closure +var _ = (Func)(( + Name d1Name, + Name c1Name, + Name b1Name) => //A2 + new A2( + ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 2, + (Func)(() => //D1 + new D1(d1Name)))), + ((C1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 1, + (Func)(() => //C1 + new C1( + ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 2, + (Func)(() => //D1 + new D1(d1Name)))), + c1Name)))), + ((B1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 0, + (Func)(() => //B1 + new B1( + ((C1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 1, + (Func)(() => //C1 + new C1( + ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 2, + (Func)(() => //D1 + new D1(d1Name)))), + c1Name)))), + b1Name, + ((D1)default(Nested_lambdas_assigned_to_vars)/*NOTE: Provide the non-default value for the Constant!*/.GetOrPut( + 2, + (Func)(() => //D1 + new D1(d1Name)))))))))); + +//Nested_lambdas_assigned_to_vars.Test_2_shared_lambdas_on_the_same_level +var _ = (Func