2004-11-17 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Wed, 17 Nov 2004 02:44:11 +0000 (02:44 -0000)
committerMartin Baulig <martin@novell.com>
Wed, 17 Nov 2004 02:44:11 +0000 (02:44 -0000)
* decl.cs (MemberCache.AddHashtable): Add entries in the opposite
direction, like FindMembers() does.  Fixes #69546, testcase is in
test-315.cs.

svn path=/trunk/mcs/; revision=36182

mcs/gmcs/ChangeLog
mcs/gmcs/decl.cs

index 3d13fa52c36c05a9f67bf8144a7714f88f8b0f1d..09832aad548ba98968a28b2a76836d5b4355bbe7 100755 (executable)
@@ -1,3 +1,9 @@
+2004-11-17  Martin Baulig  <martin@ximian.com>
+
+       * decl.cs (MemberCache.AddHashtable): Add entries in the opposite
+       direction, like FindMembers() does.  Fixes #69546, testcase is in
+       test-315.cs.    
+
 2004-11-16  Martin Baulig  <martin@ximian.com>
 
        This is based on a patch from Marek Safar, see bug #69082.
index c57a6a8d04fa2aa77a5b8c0c1e90ec64495f2f0d..547089c649d67a795504c64107121398b0c9ef1c 100755 (executable)
@@ -1699,7 +1699,10 @@ namespace Mono.CSharp {
                                if (list == null)
                                        hash [it.Key] = list = new ArrayList ();
 
-                               foreach (CacheEntry entry in (ArrayList) it.Value) {
+                               ArrayList entries = (ArrayList) it.Value;
+                               for (int i = entries.Count-1; i >= 0; i--) {
+                                       CacheEntry entry = (CacheEntry) entries [i];
+
                                        if (entry.Container != cache.Container)
                                                break;
                                        list.Add (entry);