[vala/staging] vala: Add some missing type copying
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Add some missing type copying
- Date: Tue, 23 Oct 2018 14:47:47 +0000 (UTC)
commit f5821d0e6dcf633a30a58f25752218786283a135
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 e4e707adb..2e326fa24 100644
--- a/vala/valaassignment.vala
+++ b/vala/valaassignment.vala
@@ -221,10 +221,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");
@@ -247,7 +247,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;
@@ -315,7 +315,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 cdb782cf2..f51164968 100644
--- a/vala/valareturnstatement.vala
+++ b/vala/valareturnstatement.vala
@@ -84,7 +84,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]