From 0c6b54c9d98c7036bdf7af9a7bf0e56bde8e8b1e Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Sat, 22 Jan 2011 13:06:01 -0600 Subject: [PATCH] Collision detection for iface method -> prop. * generator/ObjectGen.cs: detect method collisions on interfaces against the object properties to avoid duplicate property generation. --- generator/ObjectGen.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/generator/ObjectGen.cs b/generator/ObjectGen.cs index 0bd73fa53..7a06a8574 100644 --- a/generator/ObjectGen.cs +++ b/generator/ObjectGen.cs @@ -200,6 +200,12 @@ namespace GtkSharp.Generation { foreach (string iface in interfaces) { ClassBase igen = table.GetClassGen (iface); foreach (Method m in igen.Methods.Values) { + if (m.Name.StartsWith ("Get") || m.Name.StartsWith ("Set")) { + if (GetProperty (m.Name.Substring (3)) != null) { + collisions[m.Name] = true; + continue; + } + } Method collision = all_methods[m.Name] as Method; if (collision != null && collision.Signature.Types == m.Signature.Types) collisions[m.Name] = true;