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

test-103.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 09974f4cc2963dad37bb3494bf958b5de4264954 (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
//
// We should also allow overrides to work on protected methods.
// Only private is not considered part of the override process.
//
abstract class A {
        protected abstract int Foo ();
}

class B : A {
        protected override int Foo ()
	{
		return 0;
	}

	public int M ()
	{
		return Foo ();
	}
}

class Test {
        public static int Main ()
	{
		return new B ().M ();
        }
}