Negative header ids should be valid
[mono.git] / mcs / mcs / membercache.cs
index 5374da9db9a0c153866ae8206b32d77d9c339ee4..9ff3168869e9dd2f532086793c8d03a9f2755ef9 100644 (file)
@@ -435,12 +435,15 @@ namespace Mono.CSharp {
                // A special method to work with member lookup only. It returns a list of all members named @name
                // starting from @container. It's very performance sensitive
                //
-               public static IList<MemberSpec> FindMembers (TypeSpec container, string name, bool declaredOnly)
+               // declaredOnlyClass cannot be used interfaces. Manual filtering is required because names are
+               // compacted
+               //
+               public static IList<MemberSpec> FindMembers (TypeSpec container, string name, bool declaredOnlyClass)
                {
                        IList<MemberSpec> applicable;
 
                        do {
-                               if (container.MemberCache.member_hash.TryGetValue (name, out applicable) || declaredOnly)
+                               if (container.MemberCache.member_hash.TryGetValue (name, out applicable) || declaredOnlyClass)
                                        return applicable;
 
                                container = container.BaseType;