[mcs] Implements C# 7.2 readonly structs
[mono.git] / mcs / errors / cs0459-5.cs
1 // CS0459: Cannot take the address of `this' because it is read-only
2 // Line: 11
3 // Compiler options: -unsafe -langversion:latest
4
5 readonly struct X
6 {
7         unsafe void Test ()
8         {
9                 fixed (X* x = &this) {
10
11                 }
12         }
13 }