[vala/0.10-parallel: 32/32] Check accessibility of constants



commit 976563bdc49133a793af6a3132e0a4aa7a85a7be
Author: Jürg Billeter <j bitron ch>
Date:   Fri Sep 10 18:07:41 2010 +0200

    Check accessibility of constants

 vala/valamemberaccess.vala |    3 +++
 vala/valaparser.vala       |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 6548fc5..6a23050 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -524,6 +524,9 @@ public class Vala.MemberAccess : Expression {
 			if (f.variable_type is GenericType) {
 				generics = true;
 			}
+		} else if (member is Constant) {
+			var c = (Constant) member;
+			access = c.access;
 		} else if (member is Method) {
 			var m = (Method) member;
 			if (m.is_async_callback) {
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index b7c9a1a..01c48fc 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -3082,6 +3082,7 @@ public class Vala.Parser : CodeVisitor {
 			}
 
 			var ev = new EnumValue (id, value, get_src (value_begin), comment);
+			ev.access = SymbolAccessibility.PUBLIC;
 			set_attributes (ev, value_attrs);
 			en.add_value (ev);
 		} while (accept (TokenType.COMMA));



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