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
/
dtest-035.cs
blob
6f83bc2d2bf417aae733b2fc103fb5156a7758a6
1
using
System
;
2
3
public class
Test
4
{
5
public dynamic this
[
int
i
] {
6
get
{
7
return
0
;
8
}
9
set
{
10
}
11
}
12
13
public dynamic
[]
Prop
{
14
get
{
15
return new dynamic
[]
{ 0 }
;
16
}
17
set
{
18
}
19
}
20
21
public int
Prop2
{
22
get
{
23
return
5
;
24
}
25
set
{
26
}
27
}
28
29
int
prop
=
500
;
30
public dynamic
Prop3
31
{
32
get
{ return prop; }
33
set
{ prop = value; }
34
}
35
36
public static int
Main
()
37
{
38
int
i
=
0
;
39
var
d
=
new dynamic
[]
{ 1 }
;
40
d
[
i
++] +=
null
;
41
if
(
i
!=
1
)
42
return
1
;
43
44
i
=
0
;
45
var
t
=
new
Test
();
46
t
[
i
++] +=
null
;
47
if
(
i
!=
1
)
48
return
2
;
49
50
i
=
0
;
51
t
.
Prop
[
i
++] +=
null
;
52
if
(
i
!=
1
)
53
return
3
;
54
55
i
=
0
;
56
d
[
0
] =
9
;
57
t
.
Prop2
+=
d
[
0
];
58
59
int
v
=
3
;
60
v
*=
t
.
Prop3
-=
15
;
61
if
(
v
!=
1455
)
62
return
4
;
63
64
dynamic
dvalue
=
3
;
65
int
[]
iar
=
new
[]
{ -14 }
;
66
iar
[
0
] +=
dvalue
;
67
if
(
iar
[
0
] != -
11
)
68
return
5
;
69
70
dynamic
dn
=
1
;
71
int
?[]
array
=
new int
?[
1
];
72
array
[
0
] =
dn
;
73
if
(
array
[
0
] !=
1
)
74
return
6
;
75
76
Console
.
WriteLine
(
"ok"
);
77
return
0
;
78
}
79
}