From 42828f35fd34caf4c2d1945b36edcd525a3ca9a1 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Fri, 3 Jul 2015 16:13:13 +0300 Subject: [PATCH] Fixed the generation of abstract impl calls in property setters. Signed-off-by: Dimitar Dobrev --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 9 +++++---- tests/CSharpTemp/CSharpTemp.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 1d908bfd..5ccc01bc 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -344,7 +344,7 @@ namespace CppSharp.Generators.CSharp } else { - WriteLine("/// {0}", comment.BriefText); + WriteLine("/// {0}", comment.BriefText); } PopBlock(); } @@ -807,7 +807,9 @@ namespace CppSharp.Generators.CSharp if (function.SynthKind == FunctionSynthKind.AbstractImplCall) { - GenerateAbstractImplCall(function, @class); + string delegateId; + Write(GetAbstractCallDelegate(function, @class, out delegateId)); + GenerateFunctionCall(delegateId, new List { param }, function); } else { @@ -820,8 +822,7 @@ namespace CppSharp.Generators.CSharp } else { - var parameters = new List { param }; - GenerateInternalFunctionCall(function, parameters); + GenerateInternalFunctionCall(function, new List { param }); } } else diff --git a/tests/CSharpTemp/CSharpTemp.h b/tests/CSharpTemp/CSharpTemp.h index 1ffe08b4..797c1176 100644 --- a/tests/CSharpTemp/CSharpTemp.h +++ b/tests/CSharpTemp/CSharpTemp.h @@ -96,7 +96,7 @@ class DLL_API AbstractProprietor { public: virtual int getValue(); - virtual void setValue(int value) = 0; + virtual void setValue(int newValue) = 0; virtual long prop() = 0; virtual void setProp(long prop);