aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-03-28 17:16:44 +0800
committerGitHub <noreply@github.com>2018-03-28 17:16:44 +0800
commit3bb54e8bd5ea75bd52d2eca43fd438f8e894a2de (patch)
tree04577e8e811cdda7555c510326f7215a00d89bb5 /libsolidity
parent62559cf1278afc417d19ec181e2bced364cadea2 (diff)
parentb79531bebf67b84fbd2cfe90c1911ec563855afa (diff)
downloaddexon-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.cpp2
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;
}