Browse Source

Fix #1151: Add ref readonly test case.

pull/1726/head
Siegfried Pammer 6 years ago
parent
commit
dc1e72a3d0
  1. 5
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/RefLocalsAndReturns.cs

5
ICSharpCode.Decompiler.Tests/TestCases/Pretty/RefLocalsAndReturns.cs

@ -70,10 +70,13 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
public readonly struct ReadOnlyStruct public readonly struct ReadOnlyStruct
{ {
private readonly int dummy; private readonly int Field;
public void Method() public void Method()
{ {
ref readonly int field = ref Field;
Console.WriteLine("No inlining");
Console.WriteLine(field.GetHashCode());
} }
} }

Loading…
Cancel
Save