Author: martin
Date: 2005-04-29 05:05:39 -0400 (Fri, 29 Apr 2005)
New Revision: 43775
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/typemanager.cs
Log:
2005-04-29 Martin Baulig <[EMAIL PROTECTED]>
* typemanager.cs (TypeManager.GetInterfaces): Correctly handle
generic instances.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-04-29 09:03:57 UTC (rev 43774)
+++ trunk/mcs/gmcs/ChangeLog 2005-04-29 09:05:39 UTC (rev 43775)
@@ -1,5 +1,10 @@
2005-04-29 Martin Baulig <[EMAIL PROTECTED]>
+ * typemanager.cs (TypeManager.GetInterfaces): Correctly handle
+ generic instances.
+
+2005-04-29 Martin Baulig <[EMAIL PROTECTED]>
+
* generic.cs (TypeManager.HasConstructorConstraint): Removed.
* expression.cs (New.DoResolve): Fix the CS0304 check.
Modified: trunk/mcs/gmcs/typemanager.cs
===================================================================
--- trunk/mcs/gmcs/typemanager.cs 2005-04-29 09:03:57 UTC (rev 43774)
+++ trunk/mcs/gmcs/typemanager.cs 2005-04-29 09:05:39 UTC (rev 43775)
@@ -2202,7 +2202,6 @@
/// </summary>
public static Type [] GetInterfaces (Type t)
{
-
Type [] cached = iface_cache [t] as Type [];
if (cached != null)
return cached;
@@ -2220,14 +2219,18 @@
if (t.IsArray)
t = TypeManager.array_type;
- if (t is TypeBuilder){
+ if ((t is TypeBuilder) || t.IsGenericInstance) {
Type [] base_ifaces;
if (t.BaseType == null)
base_ifaces = NoTypes;
else
base_ifaces = GetInterfaces (t.BaseType);
- Type[] type_ifaces = (Type []) builder_to_ifaces [t];
+ Type[] type_ifaces;
+ if (t.IsGenericInstance)
+ type_ifaces = t.GetInterfaces ();
+ else
+ type_ifaces = (Type []) builder_to_ifaces [t];
if (type_ifaces == null)
type_ifaces = NoTypes;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches