[metadata] Fix leaks when handling a few attributes (#16675)
[mono-project.git] / mcs / tests / test-ref-06.cs
blob74d35f44ed8bbfde679789cbc78221a070a28374
1 using System;
3 class X
5 public static int Main ()
7 var x = new X ();
8 x [0] = 3;
9 if (x.field != 3)
10 return 1;
11 x.Prop = 5;
12 if (x.field != 5)
13 return 2;
15 return 0;
18 int field;
20 ref int this [int idx] => ref field;
22 ref int Prop => ref field;