diff --git a/src/Generator/Generators/CSharp/CSharpMarshal.cs b/src/Generator/Generators/CSharp/CSharpMarshal.cs index 8185e53d..641622eb 100644 --- a/src/Generator/Generators/CSharp/CSharpMarshal.cs +++ b/src/Generator/Generators/CSharp/CSharpMarshal.cs @@ -136,7 +136,7 @@ namespace CppSharp.Generators.CSharp } PrimitiveType primitive; - if (pointee.IsPrimitiveType(out primitive)) + if (pointee.Desugar().IsPrimitiveType(out primitive)) { Context.Return.Write(Context.ReturnVarName); return true;