From 9438706daf16b183eeea8365bd39ac8084305ad6 Mon Sep 17 00:00:00 2001 From: Djordje Mijovic Date: Tue, 9 Feb 2021 17:58:49 +0100 Subject: [PATCH] [Sol->Yul] Adding assertion for shift amount not being of FixedPointType. --- libsolidity/codegen/ir/IRGeneratorForStatements.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libsolidity/codegen/ir/IRGeneratorForStatements.cpp b/libsolidity/codegen/ir/IRGeneratorForStatements.cpp index 52100dfb0..2a9dad8cd 100644 --- a/libsolidity/codegen/ir/IRGeneratorForStatements.cpp +++ b/libsolidity/codegen/ir/IRGeneratorForStatements.cpp @@ -2749,6 +2749,10 @@ std::string IRGeneratorForStatements::shiftOperation( IRVariable const& _amountToShift ) { + solUnimplementedAssert( + _amountToShift.type().category() != Type::Category::FixedPoint, + "Not yet implemented - FixedPointType." + ); IntegerType const* amountType = dynamic_cast(&_amountToShift.type()); solAssert(amountType, "");