Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2002-11-15 01:56:51 +0300
committerMartin Baulig <martin@novell.com>2002-11-15 01:56:51 +0300
commite3842000d34a9ce7b984aefa55e1ca2df6b78c87 (patch)
tree2fd6fb391840574577edaa2ba1ba1b979e208c92 /mcs/tests/test-148.cs
parent2b808a73a435ae7c50a5edbd98eb12ba96fef4b5 (diff)
2002-11-14 Martin Baulig <martin@gnome.org>
* test-148.cs: Added some tests from bug #33089. svn path=/trunk/mcs/; revision=8989
Diffstat (limited to 'mcs/tests/test-148.cs')
-rw-r--r--mcs/tests/test-148.cs62
1 files changed, 61 insertions, 1 deletions
diff --git a/mcs/tests/test-148.cs b/mcs/tests/test-148.cs
index 8dca09c511f..6052cd9cdde 100644
--- a/mcs/tests/test-148.cs
+++ b/mcs/tests/test-148.cs
@@ -41,6 +41,13 @@ public class Z : Y
}
}
+ [IndexerName ("Whatever")]
+ public float this [long a, int b] {
+ get {
+ return a / b;
+ }
+ }
+
public int InstanceTest ()
{
double index = 5;
@@ -82,7 +89,23 @@ public class Z : Y
if (y [index] != 3)
return 5;
- return z.InstanceTest ();
+ int retval = z.InstanceTest ();
+ if (retval != 0)
+ return retval;
+
+ B b = new B ();
+ if (b [4] != 16)
+ return 8;
+ if (b [3,5] != 15)
+ return 9;
+
+ D d = new D ();
+ if (d [4] != 16)
+ return 10;
+ if (d [3,5] != 15)
+ return 11;
+
+ return 0;
}
public static int Main ()
@@ -94,3 +117,40 @@ public class Z : Y
return result;
}
}
+
+public class A
+{
+ [IndexerName("Monkey")]
+ public int this [int value] {
+ get {
+ return value * 4;
+ }
+ }
+}
+
+public class B : A
+{
+ public long this [long a, int value] {
+ get {
+ return a * value;
+ }
+ }
+}
+
+public class C
+{
+ public int this [int value] {
+ get {
+ return value * 4;
+ }
+ }
+}
+
+public class D : C
+{
+ public long this [long a, int value] {
+ get {
+ return a * value;
+ }
+ }
+}