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
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2006-02-14 19:13:50 +0300
committerMartin Baulig <martin@novell.com>2006-02-14 19:13:50 +0300
commit428c8f606e10c3a36300876d62d56b80c303c07b (patch)
tree274fd9625d4bc459c1d4664f7dea1c97621e5f00 /mcs/gmcs/typemanager.cs
parent3b2f9ae2b87644cdc5c4e09e6626836785f7c97d (diff)
2006-02-14 Martin Baulig <martin@ximian.com>
* generic.cs (ConstraintChecker.CheckConstraints): If a type parameter has the `struct' constraint, the type must be a non-nullable valuetype. svn path=/trunk/mcs/; revision=56857
Diffstat (limited to 'mcs/gmcs/typemanager.cs')
-rw-r--r--mcs/gmcs/typemanager.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/mcs/gmcs/typemanager.cs b/mcs/gmcs/typemanager.cs
index 981f3273c4b..f011c96bda6 100644
--- a/mcs/gmcs/typemanager.cs
+++ b/mcs/gmcs/typemanager.cs
@@ -591,6 +591,11 @@ public partial class TypeManager {
/// </summary>
static public string CSharpName (Type t)
{
+ if (IsNullableType (t)) {
+ t = GetTypeArguments (t) [0];
+ return CSharpName (t) + "?";
+ }
+
string name = GetFullName (t);
return Regex.Replace (name,