1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
From: Andreas Henriksson <andreas@fatal.se>
Subject: Don't generate return variable for void types
Date: Mon, 27 Mar 2017 22:19:06 +0200
Bug: https://bugzilla.xamarin.com/show_bug.cgi?id=52262
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849932
--- a/generator/Method.cs
+++ b/generator/Method.cs
@@ -54,7 +54,7 @@
if (Name == "GetType") {
Name = "GetGType";
- cacheValue = !(container_type is StructBase);
+ cacheValue = !(container_type is StructBase) && !retval.IsVoid;
cacheName = "_gtype";
}
}
|