summaryrefslogtreecommitdiff
path: root/vala/valastruct.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-02-27 10:34:54 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2021-02-27 10:34:54 +0100
commit5a210e5680772e7f28bcc6f13b6bf8803ed41c62 (patch)
tree209f4c6e1f08cf19ac8a9dc3628490f3d39313a5 /vala/valastruct.vala
parent108aa90976571b0979124c4a63d0ea733ab235cf (diff)
downloadvala-5a210e5680772e7f28bcc6f13b6bf8803ed41c62.tar.gz
vala: Set proper source_reference for implicit "this" and "result" variables
Diffstat (limited to 'vala/valastruct.vala')
-rw-r--r--vala/valastruct.vala6
1 files changed, 3 insertions, 3 deletions
diff --git a/vala/valastruct.vala b/vala/valastruct.vala
index 30355efe4..120a7b086 100644
--- a/vala/valastruct.vala
+++ b/vala/valastruct.vala
@@ -234,11 +234,11 @@ public class Vala.Struct : TypeSymbol {
*/
public override void add_method (Method m) {
if (m.binding == MemberBinding.INSTANCE || m is CreationMethod) {
- m.this_parameter = new Parameter ("this", SemanticAnalyzer.get_this_type (m, this));
+ m.this_parameter = new Parameter ("this", SemanticAnalyzer.get_this_type (m, this), m.source_reference);
m.scope.add (m.this_parameter.name, m.this_parameter);
}
if (!(m.return_type is VoidType) && m.get_postconditions ().size > 0) {
- m.result_var = new LocalVariable (m.return_type.copy (), "result", null, source_reference);
+ m.result_var = new LocalVariable (m.return_type.copy (), "result", null, m.source_reference);
m.result_var.is_result = true;
}
if (m is CreationMethod) {
@@ -279,7 +279,7 @@ public class Vala.Struct : TypeSymbol {
scope.add (prop.name, prop);
if (prop.binding == MemberBinding.INSTANCE) {
- prop.this_parameter = new Parameter ("this", SemanticAnalyzer.get_this_type (prop, this));
+ prop.this_parameter = new Parameter ("this", SemanticAnalyzer.get_this_type (prop, this), prop.source_reference);
prop.scope.add (prop.this_parameter.name, prop.this_parameter);
}