diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index 4ebbb396..141c7463 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -229,7 +229,7 @@ namespace CppSharp.Generators.CSharp Context.Type = template; return new CSharpTypePrinterResult() { - Type = typeMap.CSharpSignature(Context), + Type = GetCSharpSignature(typeMap), TypeMap = typeMap }; } @@ -237,6 +237,12 @@ namespace CppSharp.Generators.CSharp return decl.Name; } + private string GetCSharpSignature(TypeMap typeMap) + { + Context.CSharpKind = ContextKind; + return typeMap.CSharpSignature(Context); + } + public CSharpTypePrinterResult VisitTemplateParameterType( TemplateParameterType param, TypeQualifiers quals) {