diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2006-07-31 14:11:56 +0400 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2006-07-31 14:11:56 +0400 |
commit | c37bf60dc3213b820be99882d4eaddce2ec384f3 (patch) | |
tree | 0e4ce20bfbc1b756d073d9af50739d61bdba1e55 /mcs/gmcs/typemanager.cs | |
parent | b5164e5773acf1bd52bf18159e5e0af831cdd507 (diff) |
Revert r63146
It breaks building the testsuite of Mono.C5.
Note to Marek: Please use 'make compiler-tests' to verify that you don't
regress the compiler
svn path=/trunk/mcs/; revision=63170
Diffstat (limited to 'mcs/gmcs/typemanager.cs')
-rw-r--r-- | mcs/gmcs/typemanager.cs | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/mcs/gmcs/typemanager.cs b/mcs/gmcs/typemanager.cs index c5e7a220821..b3a6bb6c841 100644 --- a/mcs/gmcs/typemanager.cs +++ b/mcs/gmcs/typemanager.cs @@ -2794,7 +2794,8 @@ public partial class TypeManager { Timer.StopTimer (TimerType.MemberLookup); - list = MemberLookup_FindMembers (current_type, mt, bf, name, out used_cache); + list = MemberLookup_FindMembers ( + current_type, mt, bf, name, out used_cache); Timer.StartTimer (TimerType.MemberLookup); @@ -2854,7 +2855,8 @@ public partial class TypeManager { if ((list.Length == 2) && (list [1] is FieldInfo)) return new MemberInfo [] { list [0] }; - return list; + // Oooops + return null; } // @@ -2862,26 +2864,34 @@ public partial class TypeManager { // mode. // - if (first_members_list != null) { - if (use_first_members_list) { - method_list = CopyNewMethods (method_list, first_members_list); - use_first_members_list = false; - } - + if (first_members_list != null) { + if (use_first_members_list) { + method_list = CopyNewMethods (method_list, first_members_list); + use_first_members_list = false; + } + method_list = CopyNewMethods (method_list, list); } else { first_members_list = list; - use_first_members_list = true; + use_first_members_list = true; + mt &= (MemberTypes.Method | MemberTypes.Constructor); } } while (searching); - if (use_first_members_list) - return first_members_list; + if (use_first_members_list) { + foreach (MemberInfo mi in first_members_list) { + if (! (mi is MethodBase)) { + method_list = CopyNewMethods (method_list, first_members_list); + return (MemberInfo []) method_list.ToArray (typeof (MemberInfo)); + } + } + return (MemberInfo []) first_members_list; + } if (method_list != null && method_list.Count > 0) { - return (MemberInfo []) method_list.ToArray (typeof (MemberInfo)); - } + return (MemberInfo []) method_list.ToArray (typeof (MemberInfo)); + } // // This happens if we already used the cache in the first iteration, in this case // the cache already looked in all interfaces. @@ -3032,10 +3042,6 @@ public sealed class TypeHandle : IMemberContainer { private TypeHandle (Type type) { this.type = type; -#if MS_COMPATIBLE - if (type.IsGenericType) - this.type = this.type.GetGenericTypeDefinition (); -#endif full_name = type.FullName != null ? type.FullName : type.Name; if (type.BaseType != null) { base_cache = TypeManager.LookupMemberCache (type.BaseType); |