another test (does not work at the moment)
authorDietmar Maurer <dietmar@mono-cvs.ximian.com>
Wed, 3 Oct 2001 10:04:41 +0000 (10:04 -0000)
committerDietmar Maurer <dietmar@mono-cvs.ximian.com>
Wed, 3 Oct 2001 10:04:41 +0000 (10:04 -0000)
svn path=/trunk/mono/; revision=1062

mono/tests/Makefile.am
mono/tests/iface2.cs [new file with mode: 0644]

index 3ace723722ac0fd2ced318dfb3a33bd56fab0ee4..854add15565ee835965f91ddaa43bc2bba1c2b0f 100644 (file)
@@ -25,6 +25,7 @@ TESTSRC=                      \
        property.cs             \
        interface.cs            \
        iface.cs                \
+       iface2.cs               \
        virtual-method.cs       \
        intptrcast.cs           \
        indexer.cs              \
diff --git a/mono/tests/iface2.cs b/mono/tests/iface2.cs
new file mode 100644 (file)
index 0000000..d0a3783
--- /dev/null
@@ -0,0 +1,46 @@
+interface IA
+{
+       int Add(int i);
+}
+
+interface IB
+{
+       int Add(int i); 
+}
+
+interface IC : IA, IB {}
+
+class D : IC
+{
+       int IA.Add (int i) {
+               return 5;
+       }
+       
+       int IB.Add (int i) {
+               return 6;
+       }
+}
+       
+
+class C
+{
+       static int Test(IC n) {
+
+               if (((IA)n).Add(0) != 5)
+                       return 1;
+
+               if (((IB)n).Add(0) != 6)
+                       return 1;
+
+
+               return 0;
+       }
+
+       static int Main()
+       {
+               D d = new D();
+               
+               return Test (d);
+       }
+}
+