From 8c162239080cb079574cb7dcefaab36d7101ebd9 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 4 Jul 2026 13:14:38 +0200 Subject: [PATCH] Add pretty tests for protected, static, and generic interface members protected and protected internal default interface members, static properties and field-like events in interfaces, and a generic interface with a constrained generic default method were not covered. Assisted-by: Claude:claude-fable-5:Claude Code --- .../TestCases/Pretty/InterfaceTests.cs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InterfaceTests.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InterfaceTests.cs index b1751a8af..6ce5d003a 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InterfaceTests.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InterfaceTests.cs @@ -104,6 +104,32 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty public interface IB { } +#if CS80 && !NET40 + public interface IProtectedMembers + { + protected void ProtectedMethod(); + + protected internal void ProtectedInternalMethod() + { + ProtectedMethod(); + } + } + public interface IStaticMembers + { + static int StaticProperty { get; set; } + + static event EventHandler StaticEvent; + } + public interface IGenericWithDefaultImpl + { + T Value { get; } + + T DefaultGet(U key) where U : T + { + return Value; + } + } +#endif public class C : IA2, IA, IB { int IA.Property1 {