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
* ResolvedReference.cs (.ctor): Set 'OriginalItemSpec' and 'ResolvedFrom',
[mcs.git]
/
tests
/
test-644.cs
blob
801f03fb59d802c21e5b4770683f51ffefb4e5eb
1
using
System
;
2
3
class
Program
4
{
5
public delegate object
D
(
int
member
);
6
7
private
D _value
;
8
9
private object
M
(
int
member
)
10
{
11
return null
;
12
}
13
14
void
Test_1
()
15
{
16
Delegate d1
=
M
+
_value
;
17
Delegate d2
=
_value
+
M
;
18
}
19
20
public bool
Test_2
()
21
{
22
return
_value
==
M
;
23
}
24
25
public bool
Test_3
()
26
{
27
return
_value
!=
M
;
28
}
29
30
public bool
Test_4
(
D d
)
31
{
32
return
d
==
_value
;
33
}
34
35
static int
Main
()
36
{
37
Program p
=
new
Program
();
38
if
(
p
.
Test_2
())
39
return
1
;
40
p
.
_value
=
p
.
M
;
41
if
(!
p
.
Test_2
())
42
return
2
;
43
44
if
(
p
.
Test_3
())
45
return
3
;
46
47
Console
.
WriteLine
(
"OK"
);
48
return
0
;
49
}
50
}