diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs index 0a10fa8c3..1a88b0f4e 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs @@ -1,6 +1,7 @@ using System; #if CS100 using System.Runtime.InteropServices; +using System.Text; #endif namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -247,6 +248,8 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty #if CS100 internal class RecordStructs { + public readonly record struct ReadonlyPoint(int X, int Y); + public record struct Base(string A); public record CopyCtor(string A) @@ -445,5 +448,25 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty } } } + + internal class RecordsWithCustomSynthesizedMembers + { + public record WithCustomToString(int A) + { + public sealed override string ToString() + { + return "custom"; + } + } + + public record WithCustomPrintMembers(int A) + { + protected virtual bool PrintMembers(StringBuilder builder) + { + builder.Append("X"); + return true; + } + } + } #endif }