From 3a3f405fa9e6b3f520b53d8ea94c3c9369790434 Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 7 Jan 2014 23:32:30 +0000 Subject: [PATCH] Fixed wrong property setter type for some declarations. Some operators, like operator[], actually need the getter return type. --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 23b3df13..a68e1aa5 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -1124,7 +1124,8 @@ namespace CppSharp.Generators.CSharp GeneratePropertyGetter(prop.GetMethod, @class); if (prop.HasSetter) - GeneratePropertySetter(prop.SetMethod.Parameters[0].QualifiedType, + GeneratePropertySetter(prop.GetMethod != null ? + prop.GetMethod.ReturnType : prop.SetMethod.Parameters[0].QualifiedType, prop.SetMethod, @class); }