Author: martin
Date: 2005-12-14 17:11:26 -0500 (Wed, 14 Dec 2005)
New Revision: 54415
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/class.cs
trunk/mcs/gmcs/typemanager.cs
Log:
2005-12-14 Martin Baulig <[EMAIL PROTECTED]>
* typemanager.cs (TypeManager.GetFullName): Make this public;
`Type.Fullname' now never returns null.
* class.cs (Method.Define): Use TypeManager.GetFullName() for
explicit interface implementations; we're now using the same
naming convention than csc does.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-12-14 22:09:19 UTC (rev 54414)
+++ trunk/mcs/gmcs/ChangeLog 2005-12-14 22:11:26 UTC (rev 54415)
@@ -1,3 +1,12 @@
+2005-12-14 Martin Baulig <[EMAIL PROTECTED]>
+
+ * typemanager.cs (TypeManager.GetFullName): Make this public;
+ `Type.Fullname' now never returns null.
+
+ * class.cs (Method.Define): Use TypeManager.GetFullName() for
+ explicit interface implementations; we're now using the same
+ naming convention than csc does.
+
2005-12-14 Miguel de Icaza <[EMAIL PROTECTED]>
* convert.cs (ExplicitConversionCore): Check the return value from
Modified: trunk/mcs/gmcs/class.cs
===================================================================
--- trunk/mcs/gmcs/class.cs 2005-12-14 22:09:19 UTC (rev 54414)
+++ trunk/mcs/gmcs/class.cs 2005-12-14 22:11:26 UTC (rev 54415)
@@ -4161,10 +4161,8 @@
string method_name = MemberName.Name;
if (IsExplicitImpl) {
- string iname = InterfaceType.FullName;
- if (iname == null)
- iname = InterfaceType.Name;
- method_name =
SimpleName.RemoveGenericArity (iname) + "." + method_name;
+ method_name = TypeManager.CSharpName
(InterfaceType) +
+ '.' + method_name;
}
mb = Parent.TypeBuilder.DefineGenericMethod
(method_name, flags);
@@ -5006,10 +5004,8 @@
return false;
}
- string iname =
member.InterfaceType.FullName;
- if (iname == null)
- iname =
member.InterfaceType.Name;
- method_name =
SimpleName.RemoveGenericArity (iname) + '.' + method_name;
+ method_name = TypeManager.GetFullName
(member.InterfaceType) +
+ '.' + method_name;
} else {
if (implementing != null) {
AbstractPropertyEventMethod
prop_method = method as AbstractPropertyEventMethod;
@@ -6835,7 +6831,7 @@
PropertyAttributes.SpecialName;
PropertyBuilder = Parent.TypeBuilder.DefineProperty (
- Name, prop_attr, MemberType, null);
+ MemberName.ToString (), prop_attr, MemberType,
null);
if (!Get.IsDummy)
PropertyBuilder.SetGetMethod (GetBuilder);
Modified: trunk/mcs/gmcs/typemanager.cs
===================================================================
--- trunk/mcs/gmcs/typemanager.cs 2005-12-14 22:09:19 UTC (rev 54414)
+++ trunk/mcs/gmcs/typemanager.cs 2005-12-14 22:11:26 UTC (rev 54415)
@@ -653,17 +653,13 @@
: CSharpName (mi.DeclaringType) + '.' + mi.Name;
}
- static string GetFullName (Type t)
+ public static string GetFullName (Type t)
{
if (t.IsGenericParameter)
return t.Name;
- string name = t.FullName;
- if (name == null) // It looks like mono bug
- name = t.Name;
+ StringBuilder sb = new StringBuilder (RemoveGenericArity
(t.FullName));
- StringBuilder sb = new StringBuilder (RemoveGenericArity
(name));
-
Type[] this_args = GetTypeArguments (t);
if (this_args.Length > 0) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches