[vala/0.36] vala: Add some missing type copying
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36] vala: Add some missing type copying
- Date: Sun, 28 Oct 2018 11:47:03 +0000 (UTC)
commit 8df8868afda7824d66a58742e8b59475489afa8c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Oct 23 15:05:30 2018 +0200
vala: Add some missing type copying
vala/valaassignment.vala | 8 ++++----
vala/valareturnstatement.vala | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/vala/valaassignment.vala b/vala/valaassignment.vala
index c146b8ae1..7b9bdb862 100644
--- a/vala/valaassignment.vala
+++ b/vala/valaassignment.vala
@@ -210,10 +210,10 @@ public class Vala.Assignment : Expression {
parent_node.replace_expression (this, set_call);
return set_call.check (context);
} else {
- right.target_type = left.value_type;
+ right.target_type = left.value_type.copy ();
}
} else if (left is PointerIndirection) {
- right.target_type = left.value_type;
+ right.target_type = left.value_type.copy ();
} else {
error = true;
Report.error (source_reference, "unsupported lvalue in assignment");
@@ -237,7 +237,7 @@ public class Vala.Assignment : Expression {
var old_value = new MemberAccess (ma.inner, ma.member_name);
var bin = new BinaryExpression (BinaryOperator.PLUS, old_value, right,
source_reference);
- bin.target_type = right.target_type;
+ bin.target_type = right.target_type.copy ();
right.target_type = right.target_type.copy ();
right.target_type.value_owned = false;
@@ -341,7 +341,7 @@ public class Vala.Assignment : Expression {
return false;
}
- right.value_type = variable.variable_type;
+ right.value_type = variable.variable_type.copy ();
} else {
error = true;
Report.error (source_reference, "Assignment: Invalid assignment
attempt");
diff --git a/vala/valareturnstatement.vala b/vala/valareturnstatement.vala
index e407aec4a..320764843 100644
--- a/vala/valareturnstatement.vala
+++ b/vala/valareturnstatement.vala
@@ -78,7 +78,7 @@ public class Vala.ReturnStatement : CodeNode, Statement {
checked = true;
if (return_expression != null) {
- return_expression.target_type = context.analyzer.current_return_type;
+ return_expression.target_type = context.analyzer.current_return_type.copy ();
}
if (return_expression != null && !return_expression.check (context)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]