Allow passing null to JsonArray.Add()
[mono.git] / mcs / tests / test-771.cs
1 using System;
2
3 namespace InternalAccess
4 {
5         public abstract class Base
6         {
7                 internal Base () { }
8                 internal string Prop { get { return "A"; } }
9         }
10
11         public class DerivedInternalExample : Base
12         {
13                 public DerivedInternalExample () { }
14                 internal new string Prop { get { return "D"; } }
15         }
16
17         public class DerivedProtectedExample : Base
18         {
19                 public DerivedProtectedExample () { }
20                 protected new string Prop { get { return "E"; } }
21         }
22
23         class MainClass
24         {
25                 public static int Main ()
26                 {
27                         DerivedInternalExample die = new DerivedInternalExample ();
28                         if (die.Prop != "D")
29                                 return 1;
30
31                         DerivedProtectedExample dpe = new DerivedProtectedExample ();
32                         if (dpe.Prop != "A")
33                                 return 2;
34
35                         return 0;
36                 }
37         }
38 }