diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index a239df58c..1aece87c7 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -316,6 +316,7 @@ TypePointers TypeChecker::typeCheckMetaTypeFunctionAndRetrieveReturnType(Functio wrongType = contractType->isSuper(); else if ( typeCategory != Type::Category::Integer && + typeCategory != Type::Category::Struct && typeCategory != Type::Category::Enum ) wrongType = true; diff --git a/libsolidity/ast/TypeProvider.cpp b/libsolidity/ast/TypeProvider.cpp index 6cf8b5c03..0eb5693dd 100644 --- a/libsolidity/ast/TypeProvider.cpp +++ b/libsolidity/ast/TypeProvider.cpp @@ -563,10 +563,11 @@ MagicType const* TypeProvider::meta(Type const* _type) solAssert( _type && ( _type->category() == Type::Category::Contract || + _type->category() == Type::Category::Struct || _type->category() == Type::Category::Integer || _type->category() == Type::Category::Enum ), - "Only enum, contracts or integer types supported for now." + "Only enum, contract, struct or integer types supported for now." ); return createAndGet(_type); }