projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Updated with review feedback.
[mono.git]
/
mcs
/
tests
/
test-298.cs
1
using System;
2
3
class A
4
{
5
public static int operator + (short x, A b)
6
{
7
return -1;
8
}
9
10
public static int operator - (A a)
11
{
12
return -1;
13
}
14
}
15
16
class B : A
17
{
18
public static int operator + (int x, B d)
19
{
20
return 1;
21
}
22
23
public static int operator - (B b)
24
{
25
return 1;
26
}
27
}
28
29
class C : B
30
{
31
}
32
33
public class Test
34
{
35
public static int Main ()
36
{
37
var b = new B ();
38
short s = 3;
39
var res = s + b;
40
41
if (res != 1)
42
return 1;
43
44
var c = new C ();
45
if (-c != 1)
46
return 2;
47
48
return 0;
49
}
50
}