Browse Source

Fixed a crash when having a secondary base which is not a class.

It can be a template parameter, for instance.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/661/head
Dimitar Dobrev 10 years ago
parent
commit
7c385f4b5a
  1. 2
      src/Generator/Passes/MultipleInheritancePass.cs
  2. 5
      tests/CSharp/CSharp.h

2
src/Generator/Passes/MultipleInheritancePass.cs

@ -46,7 +46,7 @@ namespace CppSharp.Passes @@ -46,7 +46,7 @@ namespace CppSharp.Passes
{
var @base = @class.Bases[i];
var baseClass = @base.Class;
if (baseClass.IsInterface) continue;
if (baseClass == null || baseClass.IsInterface) continue;
var @interface = GetInterface(baseClass);
@class.Bases[i] = new BaseClassSpecifier(@base) { Type = new TagType(@interface) };

5
tests/CSharp/CSharp.h

@ -924,3 +924,8 @@ public: @@ -924,3 +924,8 @@ public:
int conflictWithProperty();
int getConflictWithProperty();
};
template <class Category, class Traversal>
struct iterator_category_with_traversal : Category, Traversal
{
};

Loading…
Cancel
Save