From dc1e72a3d094584d806ae041843d9eafc1ad16fb Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 28 Sep 2019 14:17:03 +0200 Subject: [PATCH] Fix #1151: Add ref readonly test case. --- .../TestCases/Pretty/RefLocalsAndReturns.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/RefLocalsAndReturns.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/RefLocalsAndReturns.cs index 63712439a..665be1a32 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/RefLocalsAndReturns.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/RefLocalsAndReturns.cs @@ -70,10 +70,13 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty public readonly struct ReadOnlyStruct { - private readonly int dummy; + private readonly int Field; public void Method() { + ref readonly int field = ref Field; + Console.WriteLine("No inlining"); + Console.WriteLine(field.GetHashCode()); } }