From fee9db9f9d67a39bdb30498d99895907bc73d852 Mon Sep 17 00:00:00 2001 From: sonyps5201314 Date: Wed, 29 Oct 2025 05:25:53 +0800 Subject: [PATCH] Fixed an issue where two `PrimaryCtorWithField` types in unit tests could not be decompiled correctly --- ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs b/ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs index 4ea7b9253..ccefe45be 100644 --- a/ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs +++ b/ICSharpCode.Decompiler/CSharp/RecordDecompiler.cs @@ -280,6 +280,10 @@ namespace ICSharpCode.Decompiler.CSharp } } } + else + { + continue; + } } if (!CheckForInitPrimaryConstructor(method, unspecializedMethod, body)) @@ -340,10 +344,6 @@ namespace ICSharpCode.Decompiler.CSharp backingMember = field; backingMembers.Add(backingMember); } - else - { - return false; - } } if (!isStruct)