diff options
author | Federico Bond <federicobond@gmail.com> | 2018-03-22 12:20:50 +0800 |
---|---|---|
committer | Federico Bond <federicobond@gmail.com> | 2018-03-22 21:05:49 +0800 |
commit | b79531bebf67b84fbd2cfe90c1911ec563855afa (patch) | |
tree | c88d3e68e3b25f9a957244b73f4c9a4223a0bfb6 /libsolidity/ast | |
parent | ba209fe485ba40ea3926800bc90932bec40cd16f (diff) | |
download | dexon-solidity-b79531bebf67b84fbd2cfe90c1911ec563855afa.tar.gz dexon-solidity-b79531bebf67b84fbd2cfe90c1911ec563855afa.tar.zst dexon-solidity-b79531bebf67b84fbd2cfe90c1911ec563855afa.zip |
Improve error message when trying to shift by fractional number
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/Types.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 41700e28..720215c9 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -327,7 +327,7 @@ bool isValidShiftAndAmountType(Token::Value _operator, Type const& _shiftAmountT else if (IntegerType const* otherInt = dynamic_cast<decltype(otherInt)>(&_shiftAmountType)) return !otherInt->isAddress(); else if (RationalNumberType const* otherRat = dynamic_cast<decltype(otherRat)>(&_shiftAmountType)) - return otherRat->integerType() && !otherRat->integerType()->isSigned(); + return !otherRat->isFractional() && otherRat->integerType() && !otherRat->integerType()->isSigned(); else return false; } |