Author: gert
Date: 2007-06-25 14:08:30 -0400 (Mon, 25 Jun 2007)
New Revision: 80710
Modified:
trunk/mcs/tools/corcompare/ChangeLog
trunk/mcs/tools/corcompare/mono-api-diff.cs
Log:
* mono-api-diff.cs: For overloaded operators we need to include the return
type in the key to allow matching.
Modified: trunk/mcs/tools/corcompare/ChangeLog
===================================================================
--- trunk/mcs/tools/corcompare/ChangeLog 2007-06-25 18:08:03 UTC (rev
80709)
+++ trunk/mcs/tools/corcompare/ChangeLog 2007-06-25 18:08:30 UTC (rev
80710)
@@ -1,6 +1,7 @@
2007-06-25 Gert Driesen <[EMAIL PROTECTED]>
- * mono-api-diff.cs: Fixed line endings.
+ * mono-api-diff.cs: Fixed line endings. For overloaded operators we
+ need to include the return type in the key to allow matching.
2007-06-18 Gert Driesen <[EMAIL PROTECTED]>
Modified: trunk/mcs/tools/corcompare/mono-api-diff.cs
===================================================================
--- trunk/mcs/tools/corcompare/mono-api-diff.cs 2007-06-25 18:08:03 UTC (rev
80709)
+++ trunk/mcs/tools/corcompare/mono-api-diff.cs 2007-06-25 18:08:30 UTC (rev
80710)
@@ -1685,6 +1685,23 @@
base.LoadExtraData (name, node);
}
+ public override string GetNodeKey (string name, XmlNode node)
+ {
+ // for explicit/implicit operators we need to include
the return
+ // type in the key to allow matching; as a side-effect,
differences
+ // in return types will be reported as extra/missing
methods
+ //
+ // for regular methods we do not need to take into
account the
+ // return type for matching methods; differences in
return types
+ // will be reported as a warning on the method
+ if (name.StartsWith ("op_")) {
+ XmlAttribute xatt = node.Attributes
["returntype"];
+ string returnType = xatt != null ? xatt.Value +
" " : string.Empty;
+ return returnType + name;
+ }
+ return name;
+ }
+
protected override void CompareToInner (string name, XmlNode
parent, XMLNameGroup other)
{
// create backup of actual counters
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches