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 committed Nov 16, 2017
1 parent f2e9dea commit aeaa6bb
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 @@ -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())
Expand Down

0 comments on commit aeaa6bb

Please sign in to comment.