Author: martin
Date: 2005-12-08 12:06:56 -0500 (Thu, 08 Dec 2005)
New Revision: 54113
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/generic.cs
trunk/mcs/gmcs/typemanager.cs
Log:
2005-12-08 Martin Baulig <[EMAIL PROTECTED]>
* generic.cs (TypeArguments.Resolve): Added CS1547 check.
* typemanager.cs (TypeManager.CSharpSignature): Include type
arguments in the signature of a generic method.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-12-08 14:56:23 UTC (rev 54112)
+++ trunk/mcs/gmcs/ChangeLog 2005-12-08 17:06:56 UTC (rev 54113)
@@ -1,3 +1,10 @@
+2005-12-08 Martin Baulig <[EMAIL PROTECTED]>
+
+ * generic.cs (TypeArguments.Resolve): Added CS1547 check.
+
+ * typemanager.cs (TypeManager.CSharpSignature): Include type
+ arguments in the signature of a generic method.
+
2005-12-07 Martin Baulig <[EMAIL PROTECTED]>
Add support for custom attributes on type parameters.
Modified: trunk/mcs/gmcs/generic.cs
===================================================================
--- trunk/mcs/gmcs/generic.cs 2005-12-08 14:56:23 UTC (rev 54112)
+++ trunk/mcs/gmcs/generic.cs 2005-12-08 17:06:56 UTC (rev 54113)
@@ -1198,6 +1198,10 @@
Report.Error (306, Location, "The type
`{0}' may not be used " +
"as a type argument.",
TypeManager.CSharpName (te.Type));
return false;
+ } else if (te.Type == TypeManager.void_type) {
+ Report.Error (1547, Location,
+ "Keyword `void' cannot be
used in this context");
+ return false;
}
atypes [i] = te.Type;
Modified: trunk/mcs/gmcs/typemanager.cs
===================================================================
--- trunk/mcs/gmcs/typemanager.cs 2005-12-08 14:56:23 UTC (rev 54112)
+++ trunk/mcs/gmcs/typemanager.cs 2005-12-08 17:06:56 UTC (rev 54113)
@@ -746,6 +746,17 @@
else
sig.Append (mb.Name);
+ if (mb.Mono_IsInflatedMethod ||
TypeManager.IsGenericMethod (mb)) {
+ Type[] args = mb.GetGenericArguments ();
+ sig.Append ('<');
+ for (int i = 0; i < args.Length; i++) {
+ if (i > 0)
+ sig.Append (',');
+ sig.Append (args [i].Name);
+ }
+ sig.Append ('>');
+ }
+
sig.Append (parameters);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches