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
[interp] Reduce computation under calc_section mutex
[mono-project.git]
/
mcs
/
tests
/
test-70.cs
blob
0173918824582d8cbd118ac6128ec02ba40ad125
1
//
2
// Tests the right settings for overrides
3
//
4
5
class
X
{
6
7
public virtual int
A
{
8
get
{
9
return
1
;
10
}
11
}
12
13
public virtual int
B
()
14
{
15
return
1
;
16
}
17
}
18
19
class
Y
:
X
{
20
public override int
A
{
21
get
{
22
return base
.
A
+
2
;
23
}
24
}
25
26
public override int
B
()
27
{
28
return base
.
B
() +
1
;
29
}
30
}
31
32
class
Z
{
33
public static int
Main
()
34
{
35
Y y
=
new
Y
();
36
X x
=
new
X
();
37
38
if
(
y
.
B
() !=
2
)
39
return
1
;
40
if
(
y
.
A
!=
3
)
41
return
2
;
42
if
(
x
.
A
!=
1
)
43
return
3
;
44
if
(
x
.
B
() !=
1
)
45
return
4
;
46
return
0
;
47
}
48
}