[vala/staging] vala: Use common visitor schema for PointerIndirection expressions
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Use common visitor schema for PointerIndirection expressions
- Date: Mon, 21 Dec 2020 12:53:19 +0000 (UTC)
commit c1eb2136c525a5ec3a1f5b340c24870c7ba55fe5
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Dec 21 13:52:17 2020 +0100
vala: Use common visitor schema for PointerIndirection expressions
Not doing so breaks assumptions of the CodeWriter leading to a mangled
output.
vala/valapointerindirection.vala | 6 ++++--
vala/valasymbolresolver.vala | 7 +++++++
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/vala/valapointerindirection.vala b/vala/valapointerindirection.vala
index bcf32b548..6c17d3598 100644
--- a/vala/valapointerindirection.vala
+++ b/vala/valapointerindirection.vala
@@ -54,13 +54,15 @@ public class Vala.PointerIndirection : Expression {
}
public override void accept (CodeVisitor visitor) {
- inner.accept (visitor);
-
visitor.visit_pointer_indirection (this);
visitor.visit_expression (this);
}
+ public override void accept_children (CodeVisitor visitor) {
+ inner.accept (visitor);
+ }
+
public override void replace_expression (Expression old_node, Expression new_node) {
if (inner == old_node) {
inner = new_node;
diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala
index 823d689d7..35d19d89d 100644
--- a/vala/valasymbolresolver.vala
+++ b/vala/valasymbolresolver.vala
@@ -731,6 +731,13 @@ public class Vala.SymbolResolver : CodeVisitor {
expr.accept_children (this);
}
+ public override void visit_pointer_indirection (PointerIndirection expr) {
+ if (expr.checked) {
+ return;
+ }
+ expr.accept_children (this);
+ }
+
public override void visit_addressof_expression (AddressofExpression expr) {
if (expr.checked) {
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]