diff --git a/src/AST/Class.cs b/src/AST/Class.cs index 30c4adaf..a9601dd7 100644 --- a/src/AST/Class.cs +++ b/src/AST/Class.cs @@ -213,7 +213,7 @@ namespace CppSharp.AST public Method GetRootBaseMethod(Method @override, bool onlyFirstBase = false) { return (from @base in Bases - where !onlyFirstBase || !@base.Class.IsInterface + where @base.IsClass && (!onlyFirstBase || !@base.Class.IsInterface) let baseMethod = ( from method in @base.Class.Methods where diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 6760952e..2c2770c0 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -716,6 +716,7 @@ namespace CppSharp.Generators.CSharp { bases.AddRange( from @base in @class.Bases + where @base.IsClass select QualifiedIdentifier(@base.Class)); }