Merge pull request #2848 from ethereum/checkViewPure

Enforce view and pure.
This commit is contained in:
chriseth authored and GitHub committed 2017-09-13 18:29:13 +02:00
commit 3f3bcc4f8a
16 files changed
+954 -90

No files matched your search

-2
View File
@@ -57,8 +57,6 @@ bool StaticAnalyzer::visit(FunctionDefinition const& _function)
solAssert(m_localVarUseCount.empty(), "");
m_nonPayablePublic = _function.isPublic() && !_function.isPayable();
m_constructor = _function.isConstructor();
if (_function.stateMutability() == StateMutability::Pure)
m_errorReporter.warning(_function.location(), "Function is marked pure. Be careful, pureness is not enforced yet.");
return true;
}