diff options
Diffstat (limited to 'vala/valalocalvariabledeclaration.vala')
-rw-r--r-- | vala/valalocalvariabledeclaration.vala | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/vala/valalocalvariabledeclaration.vala b/vala/valalocalvariabledeclaration.vala index 55a6525b3..13ff54b3e 100644 --- a/vala/valalocalvariabledeclaration.vala +++ b/vala/valalocalvariabledeclaration.vala @@ -30,7 +30,15 @@ public class Vala.LocalVariableDeclaration : CodeNode { /** * The type of the local variable. */ - public DataType type_reference { get; set; } + public DataType! type_reference { + get { return _data_type; } + set { + _data_type = value; + _data_type.parent_node = this; + } + } + + private DataType _data_type; private Gee.List<VariableDeclarator> variable_declarators = new ArrayList<VariableDeclarator> (); @@ -85,4 +93,10 @@ public class Vala.LocalVariableDeclaration : CodeNode { visitor.visit_local_variable_declaration (this); } + + public override void replace_type (DataType! old_type, DataType! new_type) { + if (type_reference == old_type) { + type_reference = new_type; + } + } } |