mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Turn uninitialized storage variables into an error.
This commit is contained in:
parent
f6edb7fb8f
commit
fe1d5da2a6
@ -1073,10 +1073,7 @@ bool TypeChecker::visit(VariableDeclarationStatement const& _statement)
|
||||
if (varDecl.referenceLocation() == VariableDeclaration::Location::Default)
|
||||
errorText += " Did you mean '<type> memory " + varDecl.name() + "'?";
|
||||
solAssert(m_scope, "");
|
||||
if (v050)
|
||||
m_errorReporter.declarationError(varDecl.location(), errorText);
|
||||
else
|
||||
m_errorReporter.warning(varDecl.location(), errorText);
|
||||
m_errorReporter.declarationError(varDecl.location(), errorText);
|
||||
}
|
||||
}
|
||||
else if (dynamic_cast<MappingType const*>(type(varDecl).get()))
|
||||
|
Loading…
Reference in New Issue
Block a user