]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix broken 20a1536f9911c1aadbfbe046bc01afc57bb724a5
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 12 Feb 2017 18:57:38 +0000 (19:57 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 12 Feb 2017 18:57:38 +0000 (19:57 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=777697

vala/valafield.vala

index 3af9433d66ed87cd3a8f8379784d2ead26108f6e..88f80905d750ae30ef3b2d586a7f9d07923475c8 100644 (file)
@@ -151,8 +151,8 @@ public class Vala.Field : Variable, Lockable {
                                return false;
                        }
 
-                       if (parent_symbol is Namespace && initializer.is_constant ()) {
-                               if ((variable_type.nullable || nitializer.is_non_null ()) && (variable_type.value_owned || variable_type.is_disposable ())) {
+                       if (parent_symbol is Namespace && initializer.is_constant () && initializer.is_non_null ()) {
+                               if (variable_type.is_disposable () && variable_type.value_owned) {
                                        error = true;
                                        Report.error (source_reference, "Owned namespace fields can only be initialized in a function or method");
                                        return false;