From 5668377c721c48f03518a02d0b3e45b5b61a52f6 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 15 Aug 2017 02:26:24 +0100 Subject: Introduce pure specifier on functions --- libsolidity/analysis/StaticAnalyzer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libsolidity/analysis') diff --git a/libsolidity/analysis/StaticAnalyzer.cpp b/libsolidity/analysis/StaticAnalyzer.cpp index ab1cbb52..2f130414 100644 --- a/libsolidity/analysis/StaticAnalyzer.cpp +++ b/libsolidity/analysis/StaticAnalyzer.cpp @@ -57,6 +57,8 @@ 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; } -- cgit