Merge pull request #214 from QuickJack/cd2c570c5543963d987f51080218715407c5d4b9
[mono.git] / mcs / tests / test-166.cs
index aac60257e52e10eaccc6352dd5a53904c029a8aa..ba956b51d02f570c46822b44511f1a3167b1c877 100644 (file)
@@ -15,6 +15,24 @@ interface IInferior : ITargetMemoryAccess
 {
 }
 
+interface ITest
+{
+       int this [int index] {
+               get;
+       }
+}
+
+class Test : ITest
+{
+       public int this [int index] {
+               get { return 5; }
+       }
+
+       int ITest.this [int index] {
+               get { return 8; }
+       }
+}
+
 class D : IInferior
 {
        public int TargetIntegerSize {
@@ -33,6 +51,14 @@ class D : IInferior
                if (d.Hello (d) != 5)
                        return 1;
 
+               Test test = new Test ();
+               ITest itest = test;
+
+               if (test [0] != 5)
+                       return 2;
+               if (itest [0] != 8)
+                       return 3;
+
                return 0;
        }
 }