Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/gmcs
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2005-12-08 20:06:56 +0300
committerMartin Baulig <martin@novell.com>2005-12-08 20:06:56 +0300
commit2c1712b5b431f4dac037b319e5fea53dcb37ded6 (patch)
treef1881c34465527e67939e8ff6e4bb9e9c0458783 /mcs/gmcs
parenta64ccb6ec117d3a8d79f6af72771ac3721fc0dad (diff)
2005-12-08 Martin Baulig <martin@ximian.com>
* generic.cs (TypeArguments.Resolve): Added CS1547 check. * typemanager.cs (TypeManager.CSharpSignature): Include type arguments in the signature of a generic method. svn path=/trunk/mcs/; revision=54113
Diffstat (limited to 'mcs/gmcs')
-rw-r--r--mcs/gmcs/ChangeLog7
-rw-r--r--mcs/gmcs/generic.cs4
-rw-r--r--mcs/gmcs/typemanager.cs11
3 files changed, 22 insertions, 0 deletions
diff --git a/mcs/gmcs/ChangeLog b/mcs/gmcs/ChangeLog
index 2e2b4ef73b3..438b048f2d2 100644
--- a/mcs/gmcs/ChangeLog
+++ b/mcs/gmcs/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-08 Martin Baulig <martin@ximian.com>
+
+ * 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 <martin@ximian.com>
Add support for custom attributes on type parameters.
diff --git a/mcs/gmcs/generic.cs b/mcs/gmcs/generic.cs
index dac1e71ea47..0e095e56702 100644
--- a/mcs/gmcs/generic.cs
+++ b/mcs/gmcs/generic.cs
@@ -1198,6 +1198,10 @@ namespace Mono.CSharp {
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;
diff --git a/mcs/gmcs/typemanager.cs b/mcs/gmcs/typemanager.cs
index 0aac1476395..42e5869b58d 100644
--- a/mcs/gmcs/typemanager.cs
+++ b/mcs/gmcs/typemanager.cs
@@ -746,6 +746,17 @@ public partial class TypeManager {
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);
}