From 1794158599484e84abc9f294ca0fa931bc256ad4 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Sat, 12 Feb 2011 15:27:10 -0600 Subject: [PATCH] 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. --- generator/Method.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/Method.cs b/generator/Method.cs index 3f47e9b8c..25803af72 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -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 ");