From: Luca Bruno Date: Sun, 26 Jan 2014 14:48:10 +0000 (+0100) Subject: Use create_temp_access instead of local.floating in MethodCall X-Git-Tag: 0.23.2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b932bae777f139e696d116d459c4bc2dc055e751;p=thirdparty%2Fvala.git Use create_temp_access instead of local.floating in MethodCall --- diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala index f30f59c40..44d674e4d 100644 --- a/vala/valamethodcall.vala +++ b/vala/valamethodcall.vala @@ -746,18 +746,15 @@ public class Vala.MethodCall : Expression { var old_parent_node = parent_node; var local = new LocalVariable (value_type, get_temp_name (), null, source_reference); - // use floating variable to avoid unnecessary (and sometimes impossible) copies - local.floating = true; var decl = new DeclarationStatement (local, source_reference); insert_statement (context.analyzer.insert_block, decl); - Expression temp_access = new MemberAccess.simple (local.name, source_reference); - temp_access.target_type = target_type; - // don't set initializer earlier as this changes parent_node and parent_statement local.initializer = this; decl.check (context); + + var temp_access = SemanticAnalyzer.create_temp_access (local, target_type); temp_access.check (context); // move temp variable to insert block to ensure the