Collision detection for iface method -> prop.

* generator/ObjectGen.cs: detect method collisions on interfaces
against the object properties to avoid duplicate property generation.
This commit is contained in:
Mike Kestner 2011-01-22 13:06:01 -06:00
parent 6772dc9e67
commit 0c6b54c9d9

View File

@ -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;