implemented type(X).min and type(X).max for all integer types

This commit is contained in:
Harikrishnan Mulackal
2020-05-11 14:51:13 +05:30
parent 4c1e821e01
commit e54c4eecfc
13 changed files with 626 additions and 29 deletions
+7 -1
View File
@@ -556,7 +556,13 @@ MagicType const* TypeProvider::magic(MagicType::Kind _kind)
MagicType const* TypeProvider::meta(Type const* _type)
{
solAssert(_type && _type->category() == Type::Category::Contract, "Only contracts supported for now.");
solAssert(
_type && (
_type->category() == Type::Category::Contract ||
_type->category() == Type::Category::Integer
),
"Only contracts or integer types supported for now."
);
return createAndGet<MagicType>(_type);
}