[Mono-docs-list] signature fix for empty parameters
John Luke
jluke@users.sourceforge.net
Sun, 12 Oct 2003 16:51:48 -0400
--=-pfz6fDJPJ3zlNVMGFRxC
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hello,
The attached patch fixes the (() bug when methods or constructors have
empty arguments. http://bugzilla.ximian.com/show_bug.cgi?id=47729
--=-pfz6fDJPJ3zlNVMGFRxC
Content-Disposition: attachment; filename=sigfix.diff
Content-Type: text/x-patch; name=sigfix.diff; charset=
Content-Transfer-Encoding: 7bit
Index: ecma-provider.cs
===================================================================
RCS file: /cvs/public/monodoc/browser/ecma-provider.cs,v
retrieving revision 1.71
diff -u -r1.71 ecma-provider.cs
--- ecma-provider.cs 12 Oct 2003 02:12:52 -0000 1.71
+++ ecma-provider.cs 12 Oct 2003 21:01:29 -0000
@@ -865,6 +865,11 @@
if (paren > 0) {
string name = sig.Substring(0, paren);
string[] args = sig.Substring(paren, sig.Length-paren-1).Split(',');
+
+ // avoid (() on no args
+ if (args.Length == 1 && args[0] == "(")
+ return ShortTypeName(sig);
+
for (int i = 0; i < args.Length; i++)
args[i] = ShortTypeName(args[i]);
return ShortTypeName(name) + "(" + String.Join(", ", args) + ")";
--=-pfz6fDJPJ3zlNVMGFRxC--