a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
29 lines
397 B
C#
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 ();
|
|
}
|
|
}
|
|
|
|
|