Skip to content

Commit

Permalink
Allow constants access through contract names (issue ethereum#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
kseo authored and ekpyron committed Apr 5, 2018
1 parent 36d6c27 commit 2d25b91
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libsolidity/ast/Types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2890,6 +2890,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())
Expand Down

0 comments on commit 2d25b91

Please sign in to comment.