Browse Source

Fixed the multiple inheritance of nested types.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
incorrect_trunit_test
Dimitar Dobrev 10 years ago
parent
commit
672f88df5a
  1. 4
      src/Generator/Passes/MultipleInheritancePass.cs
  2. 4
      tests/CSharpTemp/CSharpTemp.h

4
src/Generator/Passes/MultipleInheritancePass.cs

@ -91,7 +91,7 @@ namespace CppSharp.Passes @@ -91,7 +91,7 @@ namespace CppSharp.Passes
public override bool VisitClassDecl(Class @class)
{
if (AlreadyVisited(@class))
if (!base.VisitClassDecl(@class))
return false;
//CheckNonVirtualInheritedFunctions(@class);
@ -105,7 +105,7 @@ namespace CppSharp.Passes @@ -105,7 +105,7 @@ namespace CppSharp.Passes
var @interface = GetInterface(@class, @base, true);
@class.Bases[i] = new BaseClassSpecifier { Type = new TagType(@interface) };
}
return base.VisitClassDecl(@class);
return true;
}
private Class GetInterface(Class @class, Class @base, bool addMembers = false)

4
tests/CSharpTemp/CSharpTemp.h

@ -70,6 +70,10 @@ Bar::Bar() {} @@ -70,6 +70,10 @@ Bar::Bar() {}
class DLL_API Baz : public Foo, public Bar
{
public:
class NestedBase1 {};
class NestedBase2 {};
class NestedDerived : public NestedBase1, public NestedBase2 {};
Baz();
int takesQux(const Qux& qux);

Loading…
Cancel
Save