[vala] Declare enum when accessing enum value



commit cb4474a3ca59d8702a5e9438dcea264153b20199
Author: Jürg Billeter <j bitron ch>
Date:   Wed Apr 1 12:39:37 2009 +0200

    Declare enum when accessing enum value
---
 gobject/valaccodememberaccessmodule.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gobject/valaccodememberaccessmodule.vala b/gobject/valaccodememberaccessmodule.vala
index 8b618ac..867509f 100644
--- a/gobject/valaccodememberaccessmodule.vala
+++ b/gobject/valaccodememberaccessmodule.vala
@@ -290,6 +290,9 @@ internal class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
 			}
 		} else if (expr.symbol_reference is EnumValue) {
 			var ev = (EnumValue) expr.symbol_reference;
+
+			generate_enum_declaration ((Enum) ev.parent_symbol, source_declarations);
+
 			expr.ccodenode = new CCodeConstant (ev.get_cname ());
 		} else if (expr.symbol_reference is LocalVariable) {
 			var local = (LocalVariable) expr.symbol_reference;



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