Remove the assertion against functions bound to types for which should not be possible

- The list was wrong - we do support string and int literals
- The assertion was meant to guard against silently skipping over types for which there is no special handling. The current code handles everything in a generic way though and likely will not have to be adjusted for newly added types so the risk of that happening is low.
This commit is contained in:
Kamil Śliwak
2021-06-02 13:59:42 +02:00
parent 4cbf9ff74c
commit 3c7112ed2b
2 changed files with 26 additions and 13 deletions
@@ -1576,19 +1576,6 @@ void IRGeneratorForStatements::endVisit(MemberAccess const& _memberAccess)
if (memberFunctionType && memberFunctionType->bound())
{
solAssert((set<Type::Category>{
Type::Category::Contract,
Type::Category::Bool,
Type::Category::Integer,
Type::Category::Address,
Type::Category::Function,
Type::Category::Struct,
Type::Category::Enum,
Type::Category::Mapping,
Type::Category::Array,
Type::Category::FixedBytes,
}).count(objectCategory) > 0, "");
define(IRVariable(_memberAccess).part("self"), _memberAccess.expression());
solAssert(*_memberAccess.annotation().requiredLookup == VirtualLookup::Static, "");
if (memberFunctionType->kind() == FunctionType::Kind::Internal)