Fix crash for double variable declaration in the same scope.

This commit is contained in:
Leonardo Alt
2018-07-10 18:54:46 +02:00
parent 0e9415bc31
commit c286cdaa62
6 changed files with 44 additions and 1 deletions
+2 -1
View File
@@ -156,7 +156,8 @@ bool NameAndTypeResolver::updateDeclaration(Declaration const& _declaration)
void NameAndTypeResolver::activateVariable(string const& _name)
{
solAssert(m_currentScope, "");
m_currentScope->activateVariable(_name);
if (m_currentScope->isInvisible(_name))
m_currentScope->activateVariable(_name);
}
vector<Declaration const*> NameAndTypeResolver::resolveName(ASTString const& _name, ASTNode const* _scope) const