vala r2101 - in trunk: . vala



Author: juergbi
Date: Sun Nov 30 14:59:15 2008
New Revision: 2101
URL: http://svn.gnome.org/viewvc/vala?rev=2101&view=rev

Log:
2008-11-30  JÃrg Billeter  <j bitron ch>

	* vala/valamethodcall.vala:

	Move compiler internal variable to right block


Modified:
   trunk/ChangeLog
   trunk/vala/valamethodcall.vala

Modified: trunk/vala/valamethodcall.vala
==============================================================================
--- trunk/vala/valamethodcall.vala	(original)
+++ trunk/vala/valamethodcall.vala	Sun Nov 30 14:59:15 2008
@@ -431,6 +431,13 @@
 				decl.check (analyzer);
 				temp_access.check (analyzer);
 
+				// move temp variable to insert block to ensure the
+				// variable is in the same block as the declaration
+				// otherwise there will be scoping issues in the generated code
+				var block = (Block) analyzer.current_symbol;
+				block.remove_local_variable (local);
+				analyzer.insert_block.add_local_variable (local);
+
 				analyzer.insert_block = old_insert_block;
 
 				old_parent_node.replace_expression (this, temp_access);



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