aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-05-01 05:56:30 +0800
committerdaniel <danieljoonlee@gmail.com>2018-05-03 14:22:25 +0800
commitb34428249a24c29e17de8636c2d3011d95d052cc (patch)
treedeb52bcdc9dbafa132c1a634753c367785633d35 /libsolidity/analysis
parent2c00ebbee1b40b66cfc96c65fc58e105bb41c776 (diff)
downloaddexon-solidity-b34428249a24c29e17de8636c2d3011d95d052cc.tar.gz
dexon-solidity-b34428249a24c29e17de8636c2d3011d95d052cc.tar.zst
dexon-solidity-b34428249a24c29e17de8636c2d3011d95d052cc.zip
Change numBits to unsigned IntegerType
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 7ea10c5b..82421749 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -1200,8 +1200,9 @@ bool TypeChecker::visit(VariableDeclarationStatement const& _statement)
string extension;
if (auto type = dynamic_cast<IntegerType const*>(var.annotation().type.get()))
{
- int numBits = type->numBits();
+ unsigned numBits = type->numBits();
bool isSigned = type->isSigned();
+ solAssert(numBits > 0, "");
string minValue;
string maxValue;
if (isSigned)