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
[configure] Add new target.
[mono-project.git]
/
mcs
/
tests
/
test-75.cs
blob
819081b161641520ee170278cfcb3685fa02d179
1
//
2
// This test probes using an operator overloaded in a parents' parent
3
//
4
5
class
X
{
6
public static bool
called
=
false
;
7
8
static public
X
operator
+ (
X a
,
X b
)
9
{
10
called
=
true
;
11
return null
;
12
}
13
}
14
15
class
Y
:
X
{
16
}
17
18
class
Z
:
Y
{
19
}
20
21
class
driver
{
22
23
public static int
Main
()
24
{
25
Z a
=
new
Z
();
26
Z b
=
new
Z
();
27
X c
=
a
+
b
;
28
29
if
(
X
.
called
)
30
return
0
;
31
32
return
1
;
33
}
34
35
}
36