Files
mono/mcs/errors/cs1612-5.cs
T
Marek Safar 4788322f89 New test, update
svn path=/trunk/mcs/; revision=89101
2007-11-07 13:43:35 +00:00

23 lines
375 B
C#

// CS1612: Cannot modify a value type return value of `bar.this[int]'. Consider storing the value in a temporary variable
// Line: 19
struct foo {
public int x;
}
class bar {
public foo this [int x] {
get { return new foo (); }
set { }
}
}
class main {
static void baz (out int x) { x = 5; }
static void Main ()
{
bar b = new bar ();
baz (out b [0].x);
}
}