From 98d27e8e2517c924e86793d9656f30b6adb52b3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 30 Nov 2025 17:53:40 +0000 Subject: [PATCH] Fix test case to use block bodies instead of expression-bodied members Co-authored-by: christophwille <344208+christophwille@users.noreply.github.com> --- .../TestCases/Pretty/SemiAutoProperties.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/SemiAutoProperties.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/SemiAutoProperties.cs index 21cbb2d08..d74ce23a1 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/SemiAutoProperties.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/SemiAutoProperties.cs @@ -22,9 +22,10 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty { internal class SemiAutoProperties { - // Semi-auto property with validation in setter public int ValidatedProperty { - get => field; + get { + return field; + } set { if (value < 0) { @@ -34,7 +35,6 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty } } - // Semi-auto property with lazy initialization public string LazyProperty { get { if (field == null) @@ -43,12 +43,15 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty } return field; } - set => field = value; + set { + field = value; + } } - // Semi-auto property with notification public int NotifyProperty { - get => field; + get { + return field; + } set { if (field != value) { @@ -58,7 +61,6 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty } } - // Getter-only semi-auto property with initialization public int ReadOnlyWithInit { get { if (field == 0)