diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-01-04 22:47:01 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-01-04 22:47:01 +0100 |
commit | 3c64222b6361aceb5ee42c7523c9d854a0d7f731 (patch) | |
tree | 102a156aca60912b396760fdaf5c4bb221b5d1ef /vala | |
parent | d6b9e6aace8388d76a29b3df83413dec76324833 (diff) | |
download | vala-3c64222b6361aceb5ee42c7523c9d854a0d7f731.tar.gz |
vala: Allow to use store_field() for initializations
Diffstat (limited to 'vala')
-rw-r--r-- | vala/valaassignment.vala | 2 | ||||
-rw-r--r-- | vala/valacodegenerator.vala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vala/valaassignment.vala b/vala/valaassignment.vala index 929fa7b66..1d62a17c0 100644 --- a/vala/valaassignment.vala +++ b/vala/valaassignment.vala @@ -530,7 +530,7 @@ public class Vala.Assignment : Expression { } else if (param != null) { codegen.store_parameter (param, new_value, false, source_reference); } else if (field != null) { - codegen.store_field (field, instance && ma.inner != null ? ma.inner.target_value : null, new_value, source_reference); + codegen.store_field (field, instance && ma.inner != null ? ma.inner.target_value : null, new_value, false, source_reference); } if (!(parent_node is ExpressionStatement)) { diff --git a/vala/valacodegenerator.vala b/vala/valacodegenerator.vala index 9452b49a3..4377a0771 100644 --- a/vala/valacodegenerator.vala +++ b/vala/valacodegenerator.vala @@ -42,5 +42,5 @@ public abstract class Vala.CodeGenerator : CodeVisitor { public abstract TargetValue load_field (Field field, TargetValue? instance, Expression? expr = null); - public abstract void store_field (Field field, TargetValue? instance, TargetValue value, SourceReference? source_reference = null); + public abstract void store_field (Field field, TargetValue? instance, TargetValue value, bool initializer, SourceReference? source_reference = null); } |