From 13b5423fff481d11ff4d5dd72513a3a1bae5b22d Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Thu, 4 Aug 2016 21:08:18 +0300 Subject: [PATCH] Fixed the printing of template specialisations to work in all cases. The previous implementation worked with template specialisation types but not, for example, with template parameter substitution types. Signed-off-by: Dimitar Dobrev --- src/Generator/Generators/CSharp/CSharpTypePrinter.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index 84efe48d..cbf732c4 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -398,9 +398,7 @@ namespace CppSharp.Generators.CSharp if (ContextKind != CSharpTypePrinterContextKind.Native) return GetNestedQualifiedName(decl); var specialization = template.GetClassTemplateSpecialization(); - return string.Format("{0}.Internal{1}", - GetNestedQualifiedName(specialization), - Helpers.GetSuffixForInternal(specialization, this)); + return specialization.Visit(this); } typeMap.Declaration = decl; @@ -596,6 +594,9 @@ namespace CppSharp.Generators.CSharp public CSharpTypePrinterResult VisitClassTemplateSpecializationDecl(ClassTemplateSpecialization specialization) { + if (ContextKind == CSharpTypePrinterContextKind.Native) + return string.Format("{0}{1}", VisitClassDecl(specialization), + Helpers.GetSuffixForInternal(specialization, this)); return VisitClassDecl(specialization); }