projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[mcs] Allow properties and indexers of by-ref values to be set without setter
[mono.git]
/
mcs
/
tests
/
test-ref-06.cs
1
using System;
2
3
class X
4
{
5
public static int Main ()
6
{
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;
14
15
return 0;
16
}
17
18
int field;
19
20
ref int this [int idx] => ref field;
21
22
ref int Prop => ref field;
23
24
}