Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

22 lines
329 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 Main ()
{
bar b = new bar ();
b [0].x = 5;
}
}