]> 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 13:12:57 +0000 (14:12 +0100)
vala/valacastexpression.vala

index 86bdad1d1799641b58b0d4fdd880071ed97fc718..1dc357764646599b77e7a9086588f6587614f1af 100644 (file)
@@ -180,7 +180,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;
                }