repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[tuner] handle the case with multiple "preserve" attributes
[mono-project.git]
/
mcs
/
tests
/
test-209.cs
blob
4fe9b8d5e00ff1392d61b5bde161d44e4f5d8f22
1
using
System
;
2
3
struct
A
4
{
5
public readonly int
i
;
6
7
public
A
(
int
i
)
8
{
9
this
.
i
=
i
;
10
}
11
}
12
13
class
X
14
{
15
int
i
;
16
17
public int
Foo
{
18
get
{
19
return
2
*
i
;
20
}
21
22
set
{
23
i
=
value
;
24
}
25
}
26
27
public int this
[
int
a
] {
28
get
{
29
return
(
int
)
Foo
;
30
}
31
32
set
{
33
Foo
=
a
;
34
}
35
}
36
37
public string this
[
string
a
] {
38
set
{
39
Console
.
WriteLine
(
a
);
40
}
41
}
42
43
public string
Bar
{
44
set
{
45
Console
.
WriteLine
(
value
);
46
}
47
}
48
49
public
A A
{
50
get
{
51
return new
A
(
5
);
52
}
53
54
set
{
55
Console
.
WriteLine
(
value
);
56
}
57
}
58
59
public
X
(
int
i
)
60
{
61
this
.
i
=
i
;
62
}
63
64
public static int
Main
()
65
{
66
X x
=
new
X
(
9
);
67
int
a
=
x
.
Foo
=
16
;
68
int
b
=
x
[
8
] =
32
;
69
x
[
"Test"
] =
"Hello"
;
70
x
.
Bar
=
"World"
;
71
x
.
A
=
new
A
(
9
);
72
// Compilation-only test.
73
return
0
;
74
}
75
}
76