[vala] Support set accessors in internal VAPI properties



commit 1f2c6b36f57737042d01632142f4b8cc9eac26a2
Author: Jürg Billeter <j bitron ch>
Date:   Tue Apr 14 19:24:33 2009 +0200

    Support set accessors in internal VAPI properties
    
    Fixes bug 545187.
---
 vala/valapropertyaccessor.vala |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/vala/valapropertyaccessor.vala b/vala/valapropertyaccessor.vala
index 756ecd3..de017c2 100644
--- a/vala/valapropertyaccessor.vala
+++ b/vala/valapropertyaccessor.vala
@@ -190,14 +190,14 @@ public class Vala.PropertyAccessor : CodeNode {
 					body.add_statement (new ExpressionStatement (assignment));
 				}
 			}
+		}
 
-			if (body != null && (writable || construction)) {
+		if (body != null) {
+			if (writable || construction) {
 				value_parameter = new FormalParameter ("value", value_type, source_reference);
 				body.scope.add (value_parameter.name, value_parameter);
 			}
-		}
 
-		if (body != null) {
 			body.check (analyzer);
 		}
 



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