[vala/wip/transform: 67/99] Set parent_node to properties defult value



commit d9a14ef442768a2aa6ce6c4cccb5f2a9f9b232f2
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue Oct 30 00:00:45 2012 +0100

    Set parent_node to properties defult value

 tests/objects/properties.vala |    8 ++++++++
 vala/valaproperty.vala        |    3 +--
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/tests/objects/properties.vala b/tests/objects/properties.vala
index b051825..2e2b2ee 100644
--- a/tests/objects/properties.vala
+++ b/tests/objects/properties.vala
@@ -92,6 +92,14 @@ abstract class Maman.Foo : Object {
        public abstract int abstract_base_property { get; set; }
 }
 
+enum FooEnum {
+       FOO
+}
+
+abstract class Maman.EnumDefault {
+       public abstract FooEnum bar { get; default = FooEnum.FOO; }
+}
+
 class Maman.Bar : Foo {
        public int public_property { get; set; default = 3; }
        public override int abstract_base_property { get; set; }
diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala
index 8c19443..6f74e29 100644
--- a/vala/valaproperty.vala
+++ b/vala/valaproperty.vala
@@ -142,8 +142,6 @@ public class Vala.Property : Symbol, Lockable {
                }
        }
 
-       private Expression _initializer;
-
        private bool lock_used = false;
 
        private DataType _data_type;
@@ -153,6 +151,7 @@ public class Vala.Property : Symbol, Lockable {
        private bool base_properties_valid;
        PropertyAccessor? _get_accessor;
        PropertyAccessor? _set_accessor;
+       Expression _initializer;
 
        /**
         * Creates a new property.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]