Commit e582e3ce authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

improve error reporting for foreach statements

2007-08-30  Juerg Billeter  <j@bitron.ch>

	* vala/valasemanticanalyzer.vala: improve error reporting for foreach
	  statements

svn path=/trunk/; revision=542
parent ac5078d0
2007-08-30 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala: improve error reporting for foreach
statements
2007-08-30 Jürg Billeter <j@bitron.ch>
* vapi/Makefile.am, vapi/clutter-0.4.deps, vapi/clutter-0.4.vala,
......
......@@ -846,6 +846,12 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
}
public override void visit_end_foreach_statement (ForeachStatement! stmt) {
if (stmt.collection.error) {
// ignore inner error
stmt.error = true;
return;
}
stmt.collection_variable_declarator = new VariableDeclarator ("%s_collection".printf (stmt.variable_name));
stmt.collection_variable_declarator.type_reference = stmt.collection.static_type.copy ();
stmt.collection_variable_declarator.type_reference.transfers_ownership = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment