mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
ABI encoding functions are pure and should be usable in constants.
This commit is contained in:
@@ -2093,6 +2093,9 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
|
||||
if (auto tt = dynamic_cast<TypeType const*>(exprType.get()))
|
||||
if (tt->actualType()->category() == Type::Category::Enum)
|
||||
annotation.isPure = true;
|
||||
if (auto magicType = dynamic_cast<MagicType const*>(exprType.get()))
|
||||
if (magicType->kind() == MagicType::Kind::ABI)
|
||||
annotation.isPure = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user