2002-05-05 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Sun, 5 May 2002 20:32:41 +0000 (20:32 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sun, 5 May 2002 20:32:41 +0000 (20:32 -0000)
* test-28.cs: Improved test: before we were failing on abstract
indexers invoked in the same class (as the accessor would have no
body).

svn path=/trunk/mcs/; revision=4318

mcs/tests/ChangeLog
mcs/tests/test-28.cs

index ed1cf6c4080d8d84cd3e98e6cabb1adcf5ca6e4b..4476517087028055f0bc3ff939c31ea7336d3ce1 100755 (executable)
@@ -1,3 +1,9 @@
+2002-05-05  Miguel de Icaza  <miguel@ximian.com>
+
+       * test-28.cs: Improved test: before we were failing on abstract
+       indexers invoked in the same class (as the accessor would have no
+       body).
+
 2002-05-02  Ravi Pratap  <ravi@ximian.com>
 
        * test-113.cs : Another test for overload resolution ;-)
index 3dc65d776bd5c0444065c24649eece36cae1b7aa..50f7dbb02bf03d08d427dbee60da9280a2f46538 100644 (file)
@@ -1,5 +1,10 @@
 abstract class A {
-        protected abstract int this [int a] { get; } 
+        protected abstract int this [int a] { get; }
+
+       public int EmulateIndexer (int a)
+       {
+               return this [a];
+       }
 }
 
 class B : A {
@@ -33,7 +38,6 @@ class X {
        static int Main ()
        {
                X x = new X ();
-               int b;
 
                x [0] = 1;
                if (x.v1 != 1)
@@ -42,6 +46,11 @@ class X {
                if (x [0] != 1)
                        return 2;
 
+               B bb = new B ();
+
+               if (bb.EmulateIndexer (10) != 10)
+                       return 3;
+
                return new B ().M ();
        }
 }