diff --git a/src/AST/Class.cs b/src/AST/Class.cs index 42a1aafa..645b1363 100644 --- a/src/AST/Class.cs +++ b/src/AST/Class.cs @@ -206,7 +206,7 @@ namespace CppSharp.AST public Method GetRootBaseMethod(Method @override, bool onlyFirstBase = false) { return (from @base in Bases - where !@base.Class.IsInterface + where !onlyFirstBase || !@base.Class.IsInterface let baseMethod = ( from method in @base.Class.Methods where @@ -224,7 +224,7 @@ namespace CppSharp.AST public Property GetRootBaseProperty(Property @override, bool onlyFirstBase = false) { return (from @base in Bases - where !@base.Class.IsInterface + where !onlyFirstBase || !@base.Class.IsInterface let baseProperty = ( from property in @base.Class.Properties where diff --git a/src/Generator/Passes/CheckDuplicatedNamesPass.cs b/src/Generator/Passes/CheckDuplicatedNamesPass.cs index 1241a988..fcbf9fac 100644 --- a/src/Generator/Passes/CheckDuplicatedNamesPass.cs +++ b/src/Generator/Passes/CheckDuplicatedNamesPass.cs @@ -31,6 +31,12 @@ namespace CppSharp.Passes return UpdateName(method); } + var property = decl as Property; + if (property != null && property.Parameters.Count > 0) + { + return false; + } + var count = Count++; if (count == 0) return false; @@ -93,7 +99,7 @@ namespace CppSharp.Passes public override bool VisitProperty(Property decl) { - if(!AlreadyVisited(decl)) + if(!AlreadyVisited(decl) && decl.ExplicitInterfaceImpl == null) CheckDuplicate(decl); return false; @@ -104,7 +110,7 @@ namespace CppSharp.Passes if (ASTUtils.CheckIgnoreMethod(decl)) return false; - if(!AlreadyVisited(decl)) + if (!AlreadyVisited(decl) && decl.ExplicitInterfaceImpl == null) CheckDuplicate(decl); return false;