diff --git a/src/Generator/Generators/CLI/CLIMarshal.cs b/src/Generator/Generators/CLI/CLIMarshal.cs index b656628b..b4513956 100644 --- a/src/Generator/Generators/CLI/CLIMarshal.cs +++ b/src/Generator/Generators/CLI/CLIMarshal.cs @@ -623,7 +623,7 @@ namespace CppSharp.Generators.CLI return; } - if (!Context.Parameter.Type.SkipPointerRefs().IsPointer()) + if (!Context.Parameter.Type.Desugar().SkipPointerRefs().IsPointer()) { Context.Return.Write("*"); diff --git a/tests/Basic/Basic.cpp b/tests/Basic/Basic.cpp index 3491e0af..3247899e 100644 --- a/tests/Basic/Basic.cpp +++ b/tests/Basic/Basic.cpp @@ -19,6 +19,10 @@ const char* Foo::GetANSI() return "ANSI"; } +void Foo::TakesTypedefedPtr(FooPtr date) +{ +} + Foo2::Foo2() {} Foo2 Foo2::operator<<(signed int i) diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h index 7c875d52..8cb9485f 100644 --- a/tests/Basic/Basic.h +++ b/tests/Basic/Basic.h @@ -39,6 +39,10 @@ public: // Primitive pointer types const int* SomePointer; const int** SomePointerPointer; + + typedef Foo* FooPtr; + + void TakesTypedefedPtr(FooPtr date); }; struct DLL_API Bar