diff --git a/src/Generator/Passes/SymbolsCodeGenerator.cs b/src/Generator/Passes/SymbolsCodeGenerator.cs index 18e6a9c7..9982d7ba 100644 --- a/src/Generator/Passes/SymbolsCodeGenerator.cs +++ b/src/Generator/Passes/SymbolsCodeGenerator.cs @@ -59,8 +59,8 @@ namespace CppSharp.Passes } Class @class = (Class) method.Namespace; - bool needSubclass = method.Access == AccessSpecifier.Protected || - @class.IsAbstract; + bool needSubclass = (method.Access == AccessSpecifier.Protected || + @class.IsAbstract) && (method.IsConstructor || method.IsDestructor); string wrapper = GetWrapper(method); int i = 0; foreach (var param in method.Parameters.Where( diff --git a/tests/CSharp/CSharp.h b/tests/CSharp/CSharp.h index 78cdb0ed..628468ad 100644 --- a/tests/CSharp/CSharp.h +++ b/tests/CSharp/CSharp.h @@ -1376,6 +1376,7 @@ public: virtual int size() const = 0; virtual int capacity() const = 0; virtual void* get(int n) = 0; + void hasParameterOnEmtptyCtor(int i) {} }; class DLL_API InterfaceTester