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

fix warning when using element access with Gee.List or Gee.Map

2007-07-27  Juerg Billeter  <j@bitron.ch>

	* vala/valasemanticanalyzer.vala: fix warning when using element access
	  with Gee.List or Gee.Map

svn path=/trunk/; revision=403
parent db016167
2007-07-27 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala: fix warning when using element access
with Gee.List or Gee.Map
2007-07-27 Jürg Billeter <j@bitron.ch>
* vala/parser.y, vala/valaforeachstatement.vala,
......
......@@ -2567,6 +2567,10 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
return;
}
a.static_type = a.left.static_type;
a.static_type = a.left.static_type.copy ();
if (a.parent_node is ExpressionStatement) {
// Gee.List.get () transfers ownership but void function Gee.List.set () doesn't
a.static_type.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