diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-01 05:56:30 +0800 |
---|---|---|
committer | daniel <danieljoonlee@gmail.com> | 2018-05-03 14:22:25 +0800 |
commit | b34428249a24c29e17de8636c2d3011d95d052cc (patch) | |
tree | deb52bcdc9dbafa132c1a634753c367785633d35 /libsolidity/analysis | |
parent | 2c00ebbee1b40b66cfc96c65fc58e105bb41c776 (diff) | |
download | dexon-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.cpp | 3 |
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) |