projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #3563 from lewurm/interpreter
[mono.git]
/
mcs
/
tests
/
test-644.cs
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
public 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
}