Merge pull request #4415 from ethereum/uninitializedStoragePointer

[BREAKING] Turn uninitialized storage variables into error.
This commit is contained in:
chriseth
2018-07-10 15:24:01 +02:00
committed by GitHub
12 changed files with 31 additions and 84 deletions
+1 -4
View File
@@ -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()))