From 72aa09009d33ac37ba43505153965e812a0c31c5 Mon Sep 17 00:00:00 2001 From: triton Date: Sat, 4 Jan 2014 18:23:52 +0000 Subject: [PATCH] Fixed a C# generation crash with set-only properties. We cannot use the getter return type because it might not exist (setter-only property). Use the setter's first (and only) parameter return type instead. --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 1a540fb5..23b3df13 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -1124,8 +1124,8 @@ namespace CppSharp.Generators.CSharp GeneratePropertyGetter(prop.GetMethod, @class); if (prop.HasSetter) - GeneratePropertySetter(prop.GetMethod.ReturnType, prop.SetMethod, - @class); + GeneratePropertySetter(prop.SetMethod.Parameters[0].QualifiedType, + prop.SetMethod, @class); } WriteCloseBraceIndent();