From 511957882adbd9c83f56c1af0ec3dcbcd80ad955 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Mon, 11 Nov 2013 19:19:07 +0200 Subject: [PATCH] Fixed the C++-printing of templated types not to append an additional "::". Signed-off-by: Dimitar Dobrev --- src/Generator/Types/CppTypePrinter.cs | 3 +-- tests/CSharpTemp/CSharpTemp.Tests.cs | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Generator/Types/CppTypePrinter.cs b/src/Generator/Types/CppTypePrinter.cs index 67c76fd9..fbd5540c 100644 --- a/src/Generator/Types/CppTypePrinter.cs +++ b/src/Generator/Types/CppTypePrinter.cs @@ -121,8 +121,7 @@ namespace CppSharp.Types public string VisitTemplateSpecializationType(TemplateSpecializationType template, TypeQualifiers quals) { - string prefix = PrintLocalName ? string.Empty : "::"; - return string.Format("{0}{1}<{2}>", prefix, template.Template.TemplatedDecl.Visit(this), + return string.Format("{0}<{1}>", template.Template.TemplatedDecl.Visit(this), string.Join(", ", template.Arguments.Where( a => a.Type.Type != null && diff --git a/tests/CSharpTemp/CSharpTemp.Tests.cs b/tests/CSharpTemp/CSharpTemp.Tests.cs index e6ab78f5..a492411c 100644 --- a/tests/CSharpTemp/CSharpTemp.Tests.cs +++ b/tests/CSharpTemp/CSharpTemp.Tests.cs @@ -79,5 +79,6 @@ public class CSharpTempTests Assert.That(p.ComplexType.Check(), Is.EqualTo(5)); Assert.That(p.Test, Is.True); + Assert.That(p.IsBool, Is.False); } } \ No newline at end of file