diff options
-rw-r--r-- | AST_accept.h | 1 | ||||
-rw-r--r-- | ExpressionCompiler.cpp | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/AST_accept.h b/AST_accept.h index b1577ecd..5bd6993d 100644 --- a/AST_accept.h +++ b/AST_accept.h @@ -214,6 +214,7 @@ void VariableDeclaration::accept(ASTConstVisitor& _visitor) const if (m_value) m_value->accept(_visitor); } + _visitor.endVisit(*this); } void ModifierDefinition::accept(ASTVisitor& _visitor) diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp index e76a8a79..461dfef1 100644 --- a/ExpressionCompiler.cpp +++ b/ExpressionCompiler.cpp @@ -68,9 +68,9 @@ void ExpressionCompiler::appendStateVariableInitialization(CompilerContext& _con void ExpressionCompiler::appendStateVariableInitialization(VariableDeclaration const& _varDecl) { - LValue lvalue = LValue(m_context); - lvalue.fromDeclaration(_varDecl, _varDecl.getValue()->getLocation()); - lvalue.storeValue(*_varDecl.getType(), _varDecl.getLocation()); + LValue var = LValue(m_context); + var.fromDeclaration(_varDecl, _varDecl.getValue()->getLocation()); + var.storeValue(*_varDecl.getType(), _varDecl.getLocation()); } bool ExpressionCompiler::visit(Assignment const& _assignment) |