generator: Fix signature of static method overloads
For method with optional parameters, when generating the overload without the optional parameters, mark the overload as static if the original method is static.
This commit is contained in:
parent
3ea36f5746
commit
ee8499483e
1 changed files with 4 additions and 1 deletions
|
@ -218,7 +218,10 @@ namespace GtkSharp.Generation {
|
|||
public void GenerateOverloads (StreamWriter sw)
|
||||
{
|
||||
sw.WriteLine ();
|
||||
sw.WriteLine ("\t\tpublic " + retval.CSType + " " + Name + "(" + (Signature != null ? Signature.WithoutOptional () : "") + ") {");
|
||||
sw.Write ("\t\tpublic ");
|
||||
if (IsStatic)
|
||||
sw.Write ("static ");
|
||||
sw.WriteLine (retval.CSType + " " + Name + "(" + (Signature != null ? Signature.WithoutOptional () : "") + ") {");
|
||||
sw.WriteLine ("\t\t\t{0}{1} ({2});", !retval.IsVoid ? "return " : String.Empty, Name, Signature.CallWithoutOptionals ());
|
||||
sw.WriteLine ("\t\t}");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue