diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-08-12 21:42:47 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-08-13 19:55:07 +0200 |
commit | 2190d03f6668ac2d0f20d751951413e488188d1d (patch) | |
tree | 67bc30b827c016d7340527eb01cac72341ac6b97 /codegen | |
parent | c43c8716a8cba9789625ec7503b2d3e69404ce94 (diff) | |
download | vala-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.vala | 2 |
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. */ |