Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

29 lines
397 B
C#

//
// 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 ();
}
}