Browse Source

Only implement abstract classes in C++ for ctors/dtors

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1557/head
Dimitar Dobrev 4 years ago
parent
commit
1020e18bdc
  1. 4
      src/Generator/Passes/SymbolsCodeGenerator.cs
  2. 1
      tests/CSharp/CSharp.h

4
src/Generator/Passes/SymbolsCodeGenerator.cs

@ -59,8 +59,8 @@ namespace CppSharp.Passes
} }
Class @class = (Class) method.Namespace; Class @class = (Class) method.Namespace;
bool needSubclass = method.Access == AccessSpecifier.Protected || bool needSubclass = (method.Access == AccessSpecifier.Protected ||
@class.IsAbstract; @class.IsAbstract) && (method.IsConstructor || method.IsDestructor);
string wrapper = GetWrapper(method); string wrapper = GetWrapper(method);
int i = 0; int i = 0;
foreach (var param in method.Parameters.Where( foreach (var param in method.Parameters.Where(

1
tests/CSharp/CSharp.h

@ -1376,6 +1376,7 @@ public:
virtual int size() const = 0; virtual int size() const = 0;
virtual int capacity() const = 0; virtual int capacity() const = 0;
virtual void* get(int n) = 0; virtual void* get(int n) = 0;
void hasParameterOnEmtptyCtor(int i) {}
}; };
class DLL_API InterfaceTester class DLL_API InterfaceTester

Loading…
Cancel
Save