[vala] Struct instance fields are always public



commit e4996182221c59e72723cb2359aed23c31b19537
Author: Jürg Billeter <j bitron ch>
Date:   Wed Sep 2 11:05:26 2009 +0200

    Struct instance fields are always public

 vala/valastruct.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/vala/valastruct.vala b/vala/valastruct.vala
index 15c84a2..dd56183 100644
--- a/vala/valastruct.vala
+++ b/vala/valastruct.vala
@@ -141,6 +141,9 @@ public class Vala.Struct : TypeSymbol {
 	 * @param f a field
 	 */
 	public void add_field (Field f) {
+		// TODO report error when `private' or `protected' has been specified
+		f.access = SymbolAccessibility.PUBLIC;
+
 		fields.add (f);
 		scope.add (f.name, f);
 	}



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