Author: marek
Date: 2007-02-18 11:33:04 -0500 (Sun, 18 Feb 2007)
New Revision: 73084
Modified:
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/class.cs
trunk/mcs/mcs/decl.cs
trunk/mcs/mcs/ecore.cs
Log:
2007-02-18 Marek Safar <[EMAIL PROTECTED]>
A fix for bug #78712
* class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
too.
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2007-02-18 16:13:53 UTC (rev 73083)
+++ trunk/mcs/mcs/ChangeLog 2007-02-18 16:33:04 UTC (rev 73084)
@@ -1,5 +1,11 @@
2007-02-18 Marek Safar <[EMAIL PROTECTED]>
+ A fix for bug #78712
+ * class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
+ too.
+
+2007-02-18 Marek Safar <[EMAIL PROTECTED]>
+
A fix for bug #80493 by Atsushi Enomoto
* cs-parser.jay: Ignore invalid attribute target.
Modified: trunk/mcs/mcs/class.cs
===================================================================
--- trunk/mcs/mcs/class.cs 2007-02-18 16:13:53 UTC (rev 73083)
+++ trunk/mcs/mcs/class.cs 2007-02-18 16:33:04 UTC (rev 73084)
@@ -2623,6 +2623,22 @@
return false;
}
+ public override Type LookupAnyGeneric (string typeName)
+ {
+ if (types != null) {
+ foreach (TypeContainer tc in types) {
+ if (!tc.IsGeneric)
+ continue;
+
+ int pos = tc.Basename.LastIndexOf ('`');
+ if (pos == typeName.Length &&
String.Compare (typeName, 0, tc.Basename, 0, pos) == 0)
+ return tc.TypeBuilder;
+ }
+ }
+
+ return base.LookupAnyGeneric (typeName);
+ }
+
public void Mark_HasEquals ()
{
Methods.HasEquals = true;
Modified: trunk/mcs/mcs/decl.cs
===================================================================
--- trunk/mcs/mcs/decl.cs 2007-02-18 16:13:53 UTC (rev 73083)
+++ trunk/mcs/mcs/decl.cs 2007-02-18 16:33:04 UTC (rev 73084)
@@ -1298,6 +1298,12 @@
return null;
}
+ // Used for error reporting only
+ public virtual Type LookupAnyGeneric (string typeName)
+ {
+ return NamespaceEntry.NS.LookForAnyGenericType
(typeName);
+ }
+
public override string[] ValidAttributeTargets {
get { return attribute_targets; }
}
Modified: trunk/mcs/mcs/ecore.cs
===================================================================
--- trunk/mcs/mcs/ecore.cs 2007-02-18 16:13:53 UTC (rev 73083)
+++ trunk/mcs/mcs/ecore.cs 2007-02-18 16:33:04 UTC (rev 73084)
@@ -2137,7 +2137,7 @@
}
}
- Type t =
ec.DeclContainer.NamespaceEntry.NS.LookForAnyGenericType (Name);
+ Type t = ec.DeclContainer.LookupAnyGeneric (Name);
if (t != null) {
Namespace.Error_InvalidNumberOfTypeArguments
(t, loc);
return null;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches