[vala] Fix missing source references for some generated MemberAccess
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Fix missing source references for some generated MemberAccess
- Date: Wed, 15 Dec 2010 14:08:54 +0000 (UTC)
commit bcec84c42f0117053d95f6b660b782436f40c876
Author: Luca Bruno <lucabru src gnome org>
Date: Wed Dec 15 14:43:04 2010 +0100
Fix missing source references for some generated MemberAccess
vala/valaassignment.vala | 2 +-
vala/valabinaryexpression.vala | 2 +-
vala/valaelementaccess.vala | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/vala/valaassignment.vala b/vala/valaassignment.vala
index 2af76b7..f0b4742 100644
--- a/vala/valaassignment.vala
+++ b/vala/valaassignment.vala
@@ -190,7 +190,7 @@ public class Vala.Assignment : Expression {
var sig = (Signal) ea.container.symbol_reference;
right.target_type = new DelegateType (sig.get_delegate (ma.inner.value_type, this));
} else if (ea.container.value_type.get_member ("set") is Method) {
- var set_call = new MethodCall (new MemberAccess (ea.container, "set"));
+ var set_call = new MethodCall (new MemberAccess (ea.container, "set", source_reference), source_reference);
foreach (Expression e in ea.get_indices ()) {
set_call.add_argument (e);
}
diff --git a/vala/valabinaryexpression.vala b/vala/valabinaryexpression.vala
index 9c7aedc..0b46104 100644
--- a/vala/valabinaryexpression.vala
+++ b/vala/valabinaryexpression.vala
@@ -461,7 +461,7 @@ public class Vala.BinaryExpression : Expression {
return false;
}
- var contains_call = new MethodCall (new MemberAccess (right, "contains"));
+ var contains_call = new MethodCall (new MemberAccess (right, "contains", source_reference), source_reference);
contains_call.add_argument (left);
parent_node.replace_expression (this, contains_call);
return contains_call.check (context);
diff --git a/vala/valaelementaccess.vala b/vala/valaelementaccess.vala
index 96ae508..b7e7def 100644
--- a/vala/valaelementaccess.vala
+++ b/vala/valaelementaccess.vala
@@ -171,9 +171,9 @@ public class Vala.ElementAccess : Expression {
value_type = container.value_type.get_type_arguments ().get (i);
// replace element access by call to generic get method
- var ma = new MemberAccess (container, "get");
+ var ma = new MemberAccess (container, "get", source_reference);
ma.add_type_argument (value_type);
- var get_call = new MethodCall (ma);
+ var get_call = new MethodCall (ma, source_reference);
get_call.add_argument (index);
get_call.target_type = this.target_type;
parent_node.replace_expression (this, get_call);
@@ -193,7 +193,7 @@ public class Vala.ElementAccess : Expression {
} else {
var get_method = container.value_type.get_member ("get") as Method;
if (get_method != null) {
- var get_call = new MethodCall (new MemberAccess (container, "get"));
+ var get_call = new MethodCall (new MemberAccess (container, "get", source_reference), source_reference);
foreach (Expression e in get_indices ()) {
get_call.add_argument (e);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]