[vala] Fix symbol resolving in enums



commit 9aa7997e20b5cb51a052f70c7d9135c7c680f5c8
Author: Jürg Billeter <j bitron ch>
Date:   Thu Feb 4 19:29:03 2010 +0100

    Fix symbol resolving in enums

 vala/valaenum.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/vala/valaenum.vala b/vala/valaenum.vala
index b000a13..471a183 100644
--- a/vala/valaenum.vala
+++ b/vala/valaenum.vala
@@ -1,6 +1,6 @@
 /* valaenum.vala
  *
- * Copyright (C) 2006-2009  Jürg Billeter
+ * Copyright (C) 2006-2010  Jürg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -301,10 +301,12 @@ public class Vala.Enum : TypeSymbol {
 		process_attributes ();
 
 		var old_source_file = analyzer.current_source_file;
+		var old_symbol = analyzer.current_symbol;
 
 		if (source_reference != null) {
 			analyzer.current_source_file = source_reference.file;
 		}
+		analyzer.current_symbol = this;
 
 		foreach (EnumValue value in values) {
 			value.check (analyzer);
@@ -315,6 +317,7 @@ public class Vala.Enum : TypeSymbol {
 		}
 
 		analyzer.current_source_file = old_source_file;
+		analyzer.current_symbol = old_symbol;
 
 		return !error;
 	}



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