diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-04-30 19:23:30 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-04-30 19:23:30 +0800 |
commit | e0b178e1c51fad4c405e79e1661a6e4692f17ee8 (patch) | |
tree | 9a54f22858393401c116f35d6329df2dd31f428a /libsolidity/ast | |
parent | 1604a996fe03561b56209778f1e510a9a720c5f1 (diff) | |
download | dexon-solidity-e0b178e1c51fad4c405e79e1661a6e4692f17ee8.tar.gz dexon-solidity-e0b178e1c51fad4c405e79e1661a6e4692f17ee8.tar.zst dexon-solidity-e0b178e1c51fad4c405e79e1661a6e4692f17ee8.zip |
Disable FixedBytesType(0) aka bytes0
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/Types.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 425e5045..63724ca0 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -1283,8 +1283,10 @@ shared_ptr<FixedBytesType> FixedBytesType::smallestTypeForLiteral(string const& FixedBytesType::FixedBytesType(int _bytes): m_bytes(_bytes) { - solAssert(m_bytes >= 0 && m_bytes <= 32, - "Invalid byte number for fixed bytes type: " + dev::toString(m_bytes)); + solAssert( + m_bytes > 0 && m_bytes <= 32, + "Invalid byte number for fixed bytes type: " + dev::toString(m_bytes) + ); } bool FixedBytesType::isImplicitlyConvertibleTo(Type const& _convertTo) const |