diff options
author | chriseth <chris@ethereum.org> | 2018-03-28 17:16:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-28 17:16:44 +0800 |
commit | 3bb54e8bd5ea75bd52d2eca43fd438f8e894a2de (patch) | |
tree | 04577e8e811cdda7555c510326f7215a00d89bb5 /libsolidity | |
parent | 62559cf1278afc417d19ec181e2bced364cadea2 (diff) | |
parent | b79531bebf67b84fbd2cfe90c1911ec563855afa (diff) | |
download | dexon-solidity-3bb54e8bd5ea75bd52d2eca43fd438f8e894a2de.tar dexon-solidity-3bb54e8bd5ea75bd52d2eca43fd438f8e894a2de.tar.gz dexon-solidity-3bb54e8bd5ea75bd52d2eca43fd438f8e894a2de.tar.bz2 dexon-solidity-3bb54e8bd5ea75bd52d2eca43fd438f8e894a2de.tar.lz dexon-solidity-3bb54e8bd5ea75bd52d2eca43fd438f8e894a2de.tar.xz dexon-solidity-3bb54e8bd5ea75bd52d2eca43fd438f8e894a2de.tar.zst dexon-solidity-3bb54e8bd5ea75bd52d2eca43fd438f8e894a2de.zip |
Merge pull request #3775 from federicobond/improve-error-fractional-shift
Improve error message when attempting to shift by fractional number
Diffstat (limited to 'libsolidity')
-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; } |