Commit 04b75631 authored by Simon Werbeck's avatar Simon Werbeck Committed by Luca Bruno

Add some missing get_used_variables methods

Fixes bug 734315
parent a3a5da55
......@@ -260,4 +260,14 @@ public class Vala.ArrayCreationExpression : Expression {
codegen.visit_expression (this);
}
public override void get_used_variables (Collection<Variable> collection) {
foreach (Expression e in sizes) {
e.get_used_variables (collection);
}
if (initializer_list != null) {
initializer_list.get_used_variables (collection);
}
}
}
......@@ -224,4 +224,10 @@ public class Vala.InitializerList : Expression {
codegen.visit_expression (this);
}
public override void get_used_variables (Collection<Variable> collection) {
foreach (Expression expr in initializers) {
expr.get_used_variables (collection);
}
}
}
......@@ -76,6 +76,10 @@ public class Vala.MemberInitializer : CodeNode {
initializer.emit (codegen);
}
public override void get_used_variables (Collection<Variable> collection) {
initializer.get_used_variables (collection);
}
public override void replace_expression (Expression old_node, Expression new_node) {
if (initializer == old_node) {
initializer = new_node;
......
......@@ -479,5 +479,9 @@ public class Vala.ObjectCreationExpression : Expression {
foreach (Expression arg in argument_list) {
arg.get_used_variables (collection);
}
foreach (MemberInitializer init in object_initializer) {
init.get_used_variables (collection);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment