diff --git a/src/Generator/Generators/CLI/CLIHeadersTemplate.cs b/src/Generator/Generators/CLI/CLIHeadersTemplate.cs index 59c77444..90c70a01 100644 --- a/src/Generator/Generators/CLI/CLIHeadersTemplate.cs +++ b/src/Generator/Generators/CLI/CLIHeadersTemplate.cs @@ -600,7 +600,7 @@ namespace CppSharp.Generators.CLI PushBlock(CLIBlockKind.Typedef, typedef); GenerateDeclarationCommon(typedef); - WriteLine("public {0};", + WriteLine("{0};", string.Format(TypePrinter.VisitDelegate(function), SafeIdentifier(typedef.Name))); PopBlock(NewLineKind.BeforeNextBlock); diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h index 7908fe77..b1b45707 100644 --- a/tests/Basic/Basic.h +++ b/tests/Basic/Basic.h @@ -114,6 +114,7 @@ public: virtual int pureFunction() = 0; virtual int pureFunction1() = 0; virtual int pureFunction2() = 0; + typedef void (*QTextStreamFunction)(int &); }; class DLL_API ImplementsAbstractFoo : public AbstractFoo