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 10, 2018
1 parent 41d81a7 commit bdf6551
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 @@ -2901,6 +2901,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 bdf6551

Please sign in to comment.