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
[netcore] Implement/fix enum/nullable comparers.
[mono-project.git]
/
mono
/
tests
/
iface2.cs
blob
cc86c35705106e399747dbcaa13b42d4ce19d804
1
interface
IA
2
{
3
int
Add
(
int
i
);
4
5
int
Add2
(
int
i
);
6
}
7
8
interface
IB
9
{
10
int
Add
(
int
i
);
11
}
12
13
interface
IC
14
{
15
int
Add
(
int
i
);
16
}
17
18
interface
ID
:
IA
,
IB
{}
19
20
class
D
:
ID
21
{
22
int
IA
.
Add
(
int
i
) {
23
return
5
;
24
}
25
26
int
IA
.
Add2
(
int
i
) {
27
return
6
;
28
}
29
30
int
IB
.
Add
(
int
i
) {
31
return
7
;
32
}
33
}
34
35
36
class
E
:
IC
,
ID
37
{
38
int
IC
.
Add
(
int
i
) {
39
return
8
;
40
}
41
42
int
IA
.
Add
(
int
i
) {
43
return
9
;
44
}
45
46
int
IA
.
Add2
(
int
i
) {
47
return
10
;
48
}
49
50
int
IB
.
Add
(
int
i
) {
51
return
11
;
52
}
53
}
54
55
56
class
C
57
{
58
static int
Test
(
ID n
) {
59
60
if
(((
IA
)
n
).
Add2
(
0
) !=
6
)
61
return
1
;
62
63
if
(((
IB
)
n
).
Add
(
0
) !=
7
)
64
return
1
;
65
66
67
return
0
;
68
}
69
70
static int
Main
()
71
{
72
D d
=
new
D
();
73
E e
=
new
E
();
74
75
if
(
Test
(
d
) !=
0
)
76
return
1
;
77
78
return
0
;
79
}
80
}
81