ABI encoding functions are pure and should be usable in constants.

This commit is contained in:
chriseth
2018-05-15 14:45:54 +02:00
parent dce6224052
commit dac0029d16
5 changed files with 18 additions and 3 deletions
+3
View File
@@ -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;
}