From 00bf3714cac92927ea48ba4ed3d50c271957a0b8 Mon Sep 17 00:00:00 2001 From: Stephen Kennedy Date: Tue, 29 Oct 2013 14:49:42 +0000 Subject: [PATCH] Hack to silently ignore non-class base class (e.g. templates etc) --- src/AST/Class.cs | 2 +- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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)); }