From b4d4c8f6213a7fde62ec455c64c187b08ef0b230 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 4 Jul 2026 13:16:52 +0200 Subject: [PATCH] Add pretty test for compound assignment with checked operators Compound assignments selecting between op_Addition and op_CheckedAddition across a checked block boundary were not covered. Assisted-by: Claude:claude-fable-5:Claude Code --- .../TestCases/Pretty/Operators.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Operators.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Operators.cs index 96a033415..3d93fad27 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Operators.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Operators.cs @@ -294,5 +294,21 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty #endif a = num; } +#if CS110 + public void CheckedCompoundAssign() + { + a += b; + a -= b; + checked + { + a += b; + a -= b; + a *= b; + a /= b; + } + // force end of checked block: + ++a; + } +#endif } } \ No newline at end of file