summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Bruno <luca.bruno@immobiliare.it>2014-09-04 18:26:21 +0200
committerLuca Bruno <luca.bruno@immobiliare.it>2014-09-05 10:12:01 +0200
commitba1fa0759989dcbb9046c7dfc06cce6c4aa23411 (patch)
treeb92a447ba1746faaff5d3daa8acd61b234587909
parent343340b65668f3c33d940840e0e7bd28d47aef0b (diff)
downloadvala-ba1fa0759989dcbb9046c7dfc06cce6c4aa23411.tar.gz
Fix regression when assigning owned expressions to unowned variables.
The regression was introduced by db462e6f919da758fb. Fixes bug 736016
-rw-r--r--vala/valasemanticanalyzer.vala3
1 files changed, 1 insertions, 2 deletions
diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala
index 0cdd8787f..2f1be1b7e 100644
--- a/vala/valasemanticanalyzer.vala
+++ b/vala/valasemanticanalyzer.vala
@@ -892,8 +892,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
public static Expression create_temp_access (LocalVariable local, DataType? target_type) {
Expression temp_access = new MemberAccess.simple (local.name, local.source_reference);
- var target_owned = target_type == null || target_type.value_owned;
- if (target_owned && local.variable_type.is_disposable ()) {
+ if (local.variable_type.is_disposable ()) {
temp_access = new ReferenceTransferExpression (temp_access, local.source_reference);
temp_access.target_type = target_type != null ? target_type.copy () : local.variable_type.copy ();
temp_access.target_type.value_owned = true;