]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Don't check for GLib.Variant casting in POSIX profile
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 6 Nov 2018 13:08:03 +0000 (14:08 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 6 Nov 2018 21:11:24 +0000 (22:11 +0100)
vala/valacastexpression.vala

index 3d7114df04a964af899bf4747d18d9c4bb74962b..ee39e0e7302806ba793dfadd3fbd188337dc8745 100644 (file)
@@ -176,7 +176,8 @@ public class Vala.CastExpression : Expression {
                        value_type.nullable = true;
                }
 
-               if (is_gvariant (context, inner.value_type) && !is_gvariant (context, value_type)) {
+               if (context.profile == Profile.GOBJECT
+                   && is_gvariant (context, inner.value_type) && !is_gvariant (context, value_type)) {
                        // GVariant unboxing returns owned value
                        value_type.value_owned = true;
                }