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:
authorMarek Safar <marek.safar@gmail.com>2012-05-17 16:56:41 +0400
committerMarek Safar <marek.safar@gmail.com>2012-05-17 16:56:41 +0400
commitf79acd3c5210db4411ba71abe82ac957e0d92b4c (patch)
tree3657cb0bce2cb2d4fabc02bd88ba0b7ea1618ff8 /mcs/tests/test-845.cs
parent82169c2244185b34233360d945be28b521ed3763 (diff)
Get full expanded interface list when checking for new slot interface implementation. Fixed #5110
Diffstat (limited to 'mcs/tests/test-845.cs')
-rw-r--r--mcs/tests/test-845.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/mcs/tests/test-845.cs b/mcs/tests/test-845.cs
new file mode 100644
index 00000000000..cab90047bc9
--- /dev/null
+++ b/mcs/tests/test-845.cs
@@ -0,0 +1,51 @@
+interface IA
+{
+}
+
+interface IB
+{
+ int Foo ();
+ int Foo2 ();
+}
+
+interface IC : IA, IB
+{
+}
+
+class C1 : IA, IB
+{
+ public int Foo ()
+ {
+ return 5;
+ }
+
+ public int Foo2 ()
+ {
+ return 55;
+ }
+}
+
+class C2 : C1, IC
+{
+ public new int Foo ()
+ {
+ return 2;
+ }
+
+ public int Foo2 ()
+ {
+ return 2;
+ }
+
+ public static int Main ()
+ {
+ IC ic = new C2 ();
+ if (ic.Foo () != 2)
+ return 1;
+
+ if (ic.Foo2 () != 2)
+ return 2;
+
+ return 0;
+ }
+} \ No newline at end of file