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

test-283.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7d7a1faa211436888672654fd6e53063ef909553 (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
class X {
	public virtual int Foo () {            
		return 1;
	}
}

class Y : X {

	delegate int D();
	
	
	D GetIt () {
		return new D (base.Foo);
	}
	
	D GetIt2 () {
		return base.Foo;
	}
	
	public override int Foo () {
		return 0;
	}
	
	public static int Main ()
	{
		if (new Y ().GetIt () () == 1 && new Y ().GetIt2 () () == 1) {
			System.Console.WriteLine ("good");
			return 0;
		}
		
		return 1;
	}
}