Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-75.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 819081b161641520ee170278cfcb3685fa02d179 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// This test probes using an operator overloaded in a parents' parent
//

class X {
	public static bool called = false;
	
	static public X operator + (X a, X b)
	{
		called = true;
		return null;
	}
}

class Y : X {
}

class Z : Y {
}

class driver {

	public static int Main ()
	{
		Z a = new Z ();
		Z b = new Z ();
		X c = a + b;

		if (X.called)
			return 0;

		return 1;
	}

}