From 6fb6b63a2cdb5e9c0824578ca6a77762908dd637 Mon Sep 17 00:00:00 2001
From: ds5678 <49847914+ds5678@users.noreply.github.com>
Date: Mon, 29 Sep 2025 03:47:11 -0700
Subject: [PATCH] Fix ugly test
---
.../ICSharpCode.Decompiler.Tests.csproj | 1 +
.../TestCases/Ugly/NoLocalFunctions.Expected.cs | 10 ++++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
index 83475a278..ae0949d9d 100644
--- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
+++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
@@ -158,6 +158,7 @@
+
diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.Expected.cs b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.Expected.cs
index d26d6ed93..b69f21fed 100644
--- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.Expected.cs
+++ b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.Expected.cs
@@ -51,12 +51,14 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Ugly
private static void SimpleCaptureWithRef()
{
- _003C_003Ec__DisplayClass2_0 _003C_003Ec__DisplayClass2_ = new _003C_003Ec__DisplayClass2_0();
- _003C_003Ec__DisplayClass2_.x = 1;
#if OPT
- new Handle(new Func(_003C_003Ec__DisplayClass2_._003CSimpleCaptureWithRef_003Eg__F_007C0));
+ _003C_003Ec__DisplayClass2_0 obj = new _003C_003Ec__DisplayClass2_0();
+ obj.x = 1;
+ new Handle(new Func(obj._003CSimpleCaptureWithRef_003Eg__F_007C0));
#else
- Handle handle = new Handle(new Func(_003C_003Ec__DisplayClass2_._003CSimpleCaptureWithRef_003Eg__F_007C0));
+ _003C_003Ec__DisplayClass2_0 _003C_003Ec__DisplayClass2_1 = new _003C_003Ec__DisplayClass2_0();
+ _003C_003Ec__DisplayClass2_1.x = 1;
+ Handle handle = new Handle(new Func(_003C_003Ec__DisplayClass2_1._003CSimpleCaptureWithRef_003Eg__F_007C0));
#endif
}