diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 21daac2cd9fe..31536f0bc864 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -2891,6 +2891,13 @@ MemberList::MemberMap TypeType::nativeMembers(ContractDefinition const* _current } else { + for (VariableDeclaration const* variable: contract.stateVariables()) + if (variable->isConstant()) + members.push_back(MemberList::Member( + variable->name(), + variable->annotation().type, + variable + )); for (auto const& stru: contract.definedStructs()) members.push_back(MemberList::Member(stru->name(), stru->type(), stru)); for (auto const& enu: contract.definedEnums())