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>2011-01-19 22:49:16 +0300
committerMarek Safar <marek.safar@gmail.com>2011-01-19 22:49:16 +0300
commit19f259840cf3d63e141cdb0be3f2aabe3a88f49f (patch)
tree58839fb6eb8287d20cabd0dac3617c6e839526e7 /mcs/tests/test-804.cs
parenta4d66b17da396d35da2c2fc96586983155799628 (diff)
Unify the way the interfaces are checked for shadowing
Diffstat (limited to 'mcs/tests/test-804.cs')
-rw-r--r--mcs/tests/test-804.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/mcs/tests/test-804.cs b/mcs/tests/test-804.cs
new file mode 100644
index 00000000000..20483e4e7b7
--- /dev/null
+++ b/mcs/tests/test-804.cs
@@ -0,0 +1,43 @@
+using System;
+
+interface IA
+{
+ int Foo { get; }
+}
+
+interface IB_1 : IA
+{
+ new string Foo { get; }
+}
+
+interface IB_2 : IA
+{
+ new char Foo { get; }
+}
+
+interface IC : IB_2, IB_1
+{
+ new byte Foo { get; }
+}
+
+class A : IA
+{
+ public int Foo { get { return 3; } }
+}
+
+class B : A, IB_1
+{
+ public new string Foo { get { return "1"; } }
+}
+
+class C : B, IC
+{
+ char IB_2.Foo { get { return 'a'; } }
+
+ public new byte Foo { get { return 2; } }
+
+ public static void Main ()
+ {
+ new C ();
+ }
+}