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 May 2, 2018
1 parent 5cce2e5 commit a262b44
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 @@ -3029,6 +3029,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 a262b44

Please sign in to comment.