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>2006-07-29 22:26:50 +0400
committerMarek Safar <marek.safar@gmail.com>2006-07-29 22:26:50 +0400
commitf86196b2f2b1716dae1f55910b13f19d2cd75de9 (patch)
tree5ec822b9bea0803590316c88cf467af08c84e47f /mcs/tests/test-526.cs
parent3aa1ce61d6db4aee00d34a18a7ba71bc51bcd6ff (diff)
2006-07-29 Marek Safar <marek.safar@seznam.cz>
* anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when looking for ctor. * decl.cs (MemberCache.FindMembers): When container is interface we need to search all base interfaces as a member can be ambiguous. * delegate.cs (Delegate.FindMembers): Fixed to return valid data for Constructor member type filter. (Delegate.ResolveConstructorMethod) Uses Constructor filter. * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning reporting for returned memberinfos. * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error message. * report.cs: Updated. * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager version to work on all runtimes. (TypeManager.RealMemberLookup): Removed members filtering. svn path=/trunk/mcs/; revision=63146
Diffstat (limited to 'mcs/tests/test-526.cs')
-rw-r--r--mcs/tests/test-526.cs61
1 files changed, 61 insertions, 0 deletions
diff --git a/mcs/tests/test-526.cs b/mcs/tests/test-526.cs
new file mode 100644
index 00000000000..eab31d1867e
--- /dev/null
+++ b/mcs/tests/test-526.cs
@@ -0,0 +1,61 @@
+using System;
+
+interface IList
+{
+ int Count ();
+}
+
+interface ICounter
+{
+ int Count { set; }
+}
+
+interface IListCounter: IList, ICounter
+{
+}
+
+interface IA
+{
+ int Value ();
+}
+
+interface IB : IA
+{
+ new int Value { get; }
+}
+
+interface IC : IB
+{
+ new int Value { get; }
+}
+
+interface IBB : IList, ICounter
+{
+}
+
+interface ICC : IBB
+{
+}
+
+class Test
+{
+ static void Main ()
+ {
+ }
+
+ static void Foo (IListCounter t)
+ {
+ t.Count ();
+ }
+
+ void Foo2 (IC b)
+ {
+ int i = b.Value;
+ }
+
+ void Foo3 (ICC c)
+ {
+ c.Count ();
+ }
+
+} \ No newline at end of file