vala r2380 - in trunk: . vala



Author: juergbi
Date: Sat Jan 17 22:29:47 2009
New Revision: 2380
URL: http://svn.gnome.org/viewvc/vala?rev=2380&view=rev

Log:
2009-01-17  JÃrg Billeter  <j bitron ch>

	* vala/valaconstant.vala:
	* vala/valafield.vala:

	Fix symbol lookup in constant and field initializers,
	fixes bug 567760


Modified:
   trunk/ChangeLog
   trunk/vala/valaconstant.vala
   trunk/vala/valafield.vala

Modified: trunk/vala/valaconstant.vala
==============================================================================
--- trunk/vala/valaconstant.vala	(original)
+++ trunk/vala/valaconstant.vala	Sat Jan 17 22:29:47 2009
@@ -1,6 +1,6 @@
 /* valaconstant.vala
  *
- * Copyright (C) 2006-2008  JÃrg Billeter
+ * Copyright (C) 2006-2009  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
@@ -160,6 +160,14 @@
 
 		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;
+
 		type_reference.check (analyzer);
 
 		if (!external_package) {
@@ -173,6 +181,9 @@
 			}
 		}
 
+		analyzer.current_source_file = old_source_file;
+		analyzer.current_symbol = old_symbol;
+
 		return !error;
 	}
 }

Modified: trunk/vala/valafield.vala
==============================================================================
--- trunk/vala/valafield.vala	(original)
+++ trunk/vala/valafield.vala	Sat Jan 17 22:29:47 2009
@@ -282,10 +282,12 @@
 		checked = true;
 
 		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;
 
 		field_type.check (analyzer);
 
@@ -330,6 +332,7 @@
 		}
 
 		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]