Suppress override on iface ToString decls.

* generator/Method.cs: interface method declarations do not support or
need an override keyword, so block the generation of it when the implementor
and container_type indicate generation of the iface itself.
This commit is contained in:
Mike Kestner 2011-02-12 15:27:10 -06:00
parent 35b60b19eb
commit 1794158599

View File

@ -126,7 +126,7 @@ namespace GtkSharp.Generation {
if (implementor != null)
dup = implementor.GetMethodRecursively (Name);
if (Name == "ToString" && Parameters.Count == 0)
if (Name == "ToString" && Parameters.Count == 0 && (!(container_type is InterfaceGen)|| implementor != null))
sw.Write("override ");
else if (Name == "GetGType" && container_type is ObjectGen)
sw.Write("new ");