Assume that enums always take 1-byte in the codegen and type system

This commit is contained in:
Kamil Śliwak
2020-11-16 18:58:19 +01:00
parent 1bf700e088
commit ade71d58f8
2 changed files with 6 additions and 8 deletions
+2 -2
View File
@@ -203,8 +203,8 @@ string YulUtilFunctions::leftAlignFunction(Type const& _type)
break;
case Type::Category::Enum:
{
unsigned storageBytes = dynamic_cast<EnumType const&>(_type).storageBytes();
templ("body", "aligned := " + leftAlignFunction(IntegerType(8 * storageBytes)) + "(value)");
solAssert(dynamic_cast<EnumType const&>(_type).storageBytes() == 1, "");
templ("body", "aligned := " + leftAlignFunction(IntegerType(8)) + "(value)");
break;
}
case Type::Category::InaccessibleDynamic: