Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / test-241.cs
1 //
2 // This test is for bug 57303
3 //
4 // Access via a base-instance to a protected method is allowed if we are a nested class
5 //
6 using System;
7
8 public class Foo {
9         protected virtual int SomeProperty {
10                 get { return 10; }
11         }
12         
13         protected virtual int M ()
14         {
15                 return 10;
16         }
17
18         private class FooPrivate : Foo {
19                 Foo _realFoo;
20                 
21                 internal FooPrivate(Foo f) {
22                         _realFoo = f;
23                 }
24                 
25                 protected override int SomeProperty {
26                         get { return this._realFoo.SomeProperty + _realFoo.M ();
27                         }
28                 }
29         }
30
31         public static void Main () { }
32 }