diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs index 1a88b0f4e..75f65536f 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Records.cs @@ -285,6 +285,10 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty public record struct PairWithPrimaryCtor(A First, B Second); + public readonly record struct BoundsInfo(int Profile, Bounds Bounds); + + public readonly record struct Bounds(ulong Small, ulong Large); + public record struct PrimaryCtor(int A, string B); public record struct MultipleCtorsNoPrimaryCtor @@ -447,6 +451,19 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty C = 1.41; } } + + private static BoundsInfo GetInfo() + { + return new BoundsInfo(1, new Bounds(2uL, 3uL)); + } + + public static void NestedDeconstruction() + { + var (value, (value2, value3)) = GetInfo(); + Console.WriteLine(value); + Console.WriteLine(value2); + Console.WriteLine(value3); + } } internal class RecordsWithCustomSynthesizedMembers