[mcs] Initial by ref returns and variables support
[mono.git] / mcs / errors / cs8153.cs
1 // CS8153: An expression tree lambda cannot contain a call to a method, property, or indexer that returns by reference
2 // Line: 11
3
4 using System;
5 using System.Linq.Expressions;
6
7 class X
8 {
9         void Foo ()
10         {
11                 Expression<Func<int>> e = () => Test (ref this[0]);
12         }
13
14         static int Test (ref int y)
15         {
16                 return y;
17         }
18
19         ref int this [int y] {
20                 get {
21                         throw null;
22                 }
23         }
24 }