From 82e461be8c74782943ad32210eb9559176cc5d41 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 2 Jun 2025 08:13:12 +0200 Subject: [PATCH] Change return type of Clone method in derived class. --- ICSharpCode.Decompiler/DecompilerSettings.cs | 2 +- ILSpy/Options/DecompilerSettings.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ICSharpCode.Decompiler/DecompilerSettings.cs b/ICSharpCode.Decompiler/DecompilerSettings.cs index 02bfd027c..0ccfec2fa 100644 --- a/ICSharpCode.Decompiler/DecompilerSettings.cs +++ b/ICSharpCode.Decompiler/DecompilerSettings.cs @@ -2238,7 +2238,7 @@ namespace ICSharpCode.Decompiler } } - public DecompilerSettings Clone() + public virtual DecompilerSettings Clone() { DecompilerSettings settings = (DecompilerSettings)MemberwiseClone(); if (csharpFormattingOptions != null) diff --git a/ILSpy/Options/DecompilerSettings.cs b/ILSpy/Options/DecompilerSettings.cs index cfbc88eb0..4281b6f0f 100644 --- a/ILSpy/Options/DecompilerSettings.cs +++ b/ILSpy/Options/DecompilerSettings.cs @@ -17,8 +17,6 @@ // DEALINGS IN THE SOFTWARE. using System.ComponentModel; - -using ICSharpCode.ILSpyX.Settings; using System.Linq; using System.Reflection; using System.Xml.Linq; @@ -56,5 +54,10 @@ namespace ICSharpCode.ILSpy.Options p.SetValue(this, value.Value); } } + + public override DecompilerSettings Clone() + { + return (DecompilerSettings)base.Clone(); + } } }