From 9674e0982da81fcdc124eb4ef21cef831c54c123 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 4 Jul 2026 13:17:04 +0200 Subject: [PATCH] Add pretty tests for static abstract checked and shift operators Static abstract interface members had no checked operator or unsigned-right-shift coverage, and static abstract property getters were never read as rvalues through the constraint. Assisted-by: Claude:claude-fable-5:Claude Code --- .../Pretty/StaticAbstractInterfaceMembers.cs | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/StaticAbstractInterfaceMembers.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/StaticAbstractInterfaceMembers.cs index e773dd2f0..dde1d6d76 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/StaticAbstractInterfaceMembers.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/StaticAbstractInterfaceMembers.cs @@ -223,4 +223,38 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.StaticAbstractInterfaceM ++t; } } + +#if CS110 + internal class ZZCheckedAndShiftOperatorTest + { + public interface IShifty where T : IShifty + { + static abstract T operator +(T l, T r); + + static abstract T operator checked +(T l, T r); + + static abstract T operator >>>(T l, int r); + } + + public static T Add(T a, T b) where T : IShifty + { + return a + b; + } + + public static T AddChecked(T a, T b) where T : IShifty + { + return checked(a + b); + } + + public static T Shift(T a) where T : IShifty + { + return a >>> 3; + } + + public static int UsePropertiesAsRValue() where T : IAmSimple + { + return T.Capacity + T.Count; + } + } +#endif }