[mcs] Implements C# 7.2 readonly structs
[mono.git] / mcs / errors / cs1605-2.cs
1 // CS1605: Cannot pass `this' as a ref or out argument because it is read-only
2 // Line: 14
3 // Compiler options: -langversion:latest
4
5 readonly struct X
6 {
7         void Test (out X x)
8         {
9                 x = new X ();
10         }
11         
12         void Run ()
13         {
14                 Test (out this);
15         }
16 }