[build] Fix warning (#4177)
[mono-project.git] / mcs / tests / test-784.cs
blob7e2df6f4fc364096f7509e99a9043c65049f5e7a
1 using System;
3 public class A
5 protected int value = 9;
7 public virtual int this [int i]
9 get { throw new NotImplementedException (); }
10 set { this.value = i; }
14 public class B : A
16 public override int this [int i]
18 get { return value; }
22 public class C : B
24 public override int this [int i]
26 get { return base [i]; }
27 set { base [i] = value; }
30 public static int Main ()
32 var c = new C ();
33 var r = c [100]++;
34 Console.WriteLine (r);
35 if (r != 9)
36 return 1;
38 return 0;