summaryrefslogtreecommitdiff
path: root/codegen
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-08-12 21:42:47 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2018-08-13 19:55:07 +0200
commit2190d03f6668ac2d0f20d751951413e488188d1d (patch)
tree67bc30b827c016d7340527eb01cac72341ac6b97 /codegen
parentc43c8716a8cba9789625ec7503b2d3e69404ce94 (diff)
downloadvala-2190d03f6668ac2d0f20d751951413e488188d1d.tar.gz
codegen: Fix floating reference regression with Variants
Let ConditionalExpression sink floating references. Fixes https://gitlab.gnome.org/GNOME/vala/issues/661
Diffstat (limited to 'codegen')
-rw-r--r--codegen/valaccodebasemodule.vala2
1 files changed, 1 insertions, 1 deletions
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 14886a3cc..2da65098a 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5847,7 +5847,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
var result = ((GLibValue) value).copy ();
if (type.value_owned
- && (target_type is GenericType || (target_type is ObjectType && !target_type.floating_reference))
+ && (target_type == null || target_type is GenericType || !target_type.floating_reference)
&& type.floating_reference) {
/* floating reference, sink it.
*/