From 309592c3fe3afe9f05125e35ddbdb774e94da6d1 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 4 Jul 2026 13:12:34 +0200 Subject: [PATCH] Add pretty tests for lifted compound assignment and nullable boxing The lifted-operator matrix only used pure expressions; compound assignment on nullable locals and boxing/unboxing conversions of Nullable were not covered. Assisted-by: Claude:claude-fable-5:Claude Code --- .../TestCases/Pretty/LiftedOperators.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs index 0f7ee9d32..e92b8baf7 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.cs @@ -937,6 +937,26 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty } } + internal class T04_LiftedCompoundAssignAndBoxing + { + public static int? CompoundAssign(int? x, int? y) + { + x += y; + x <<= 2; + return x; + } + + public static object Box(int? x) + { + return x; + } + + public static int? Unbox(object o) + { + return (int?)o; + } + } + // dummy structure for testing custom operators [StructLayout(LayoutKind.Sequential, Size = 1)] public struct TS