repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2008-09-29 Jb Evain <jbevain@novell.com>
[mcs.git]
/
tests
/
test-15.cs
blob
2ee08a7e6f5102dc904423d612e80121f84f6a75
1
using
System
;
2
3
interface
Iface
{
4
int
A
();
5
}
6
7
class
Implementor
:
Iface
{
8
public int
A
() {
9
return
1
;
10
}
11
}
12
13
struct
StructImplementor
:
Iface
{
14
public int
A
() {
15
return
2
;
16
}
17
}
18
class
Run
{
19
20
static int
Main
()
21
{
22
Iface iface
;
23
Implementor i
=
new
Implementor
();
24
25
iface
=
i
;
26
if
(
iface
.
A
() !=
1
)
27
return
1
;
28
29
StructImplementor s
=
new
StructImplementor
();
30
Iface xiface
= (
Iface
)
s
;
31
if
(
xiface
.
A
() !=
2
)
32
return
2
;
33
34
return
0
;
35
}
36
}