[mcs] Initial by ref returns and variables support
[mono.git] / mcs / tests / test-ref-03.cs
1 class X
2 {
3         int x;
4
5         static void Main ()
6         {
7                 var x = new X ();
8                 Foo (ref x.Wrap (1));
9                 Foo (ref x.Prop);
10                 Foo (ref x[""]);                
11         }
12
13         ref int Wrap (int arg)
14         {
15                 return ref x;
16         }
17
18         ref int Prop {
19                 get {
20                         return ref x;
21                 }
22         }
23
24         ref int this [string arg] {
25                 get {
26                         return ref x;
27                 }
28         }
29
30         static void Foo (ref int arg)
31         {
32         }
33 }