aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/ASTJsonConverter.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-17 00:03:06 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-17 00:23:09 +0800
commit7700f4033ec9f1f14fc798ab4f030d850c6b9db3 (patch)
tree86e2927878c179ec9e218020c4936cb6e0073912 /libsolidity/ast/ASTJsonConverter.cpp
parent33ea314a24a17e9d3906c7a4fef0298ea674eb0f (diff)
downloaddexon-solidity-7700f4033ec9f1f14fc798ab4f030d850c6b9db3.tar.gz
dexon-solidity-7700f4033ec9f1f14fc798ab4f030d850c6b9db3.tar.zst
dexon-solidity-7700f4033ec9f1f14fc798ab4f030d850c6b9db3.zip
Remove isDeclaredConst() from functions
Diffstat (limited to 'libsolidity/ast/ASTJsonConverter.cpp')
-rw-r--r--libsolidity/ast/ASTJsonConverter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp
index ee74b1e6..3f16db23 100644
--- a/libsolidity/ast/ASTJsonConverter.cpp
+++ b/libsolidity/ast/ASTJsonConverter.cpp
@@ -323,7 +323,7 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node)
{
std::vector<pair<string, Json::Value>> attributes = {
make_pair("name", _node.name()),
- make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.isDeclaredConst()),
+ make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.stateMutability() == StateMutability::View),
make_pair("payable", _node.isPayable()),
make_pair("statemutability", stateMutabilityToString(_node.stateMutability())),
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
@@ -421,7 +421,7 @@ bool ASTJsonConverter::visit(FunctionTypeName const& _node)
make_pair("payable", _node.isPayable()),
make_pair("visibility", Declaration::visibilityToString(_node.visibility())),
make_pair("statemutability", stateMutabilityToString(_node.stateMutability())),
- make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.isDeclaredConst()),
+ make_pair(m_legacy ? "constant" : "isDeclaredConst", _node.stateMutability() == StateMutability::View),
make_pair("parameterTypes", toJson(*_node.parameterTypeList())),
make_pair("returnParameterTypes", toJson(*_node.returnParameterTypeList())),
make_pair("typeDescriptions", typePointerToJson(_node.annotation().type))