diff options
author | chriseth <chris@ethereum.org> | 2017-07-31 22:14:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-31 22:14:46 +0800 |
commit | c2215d4605d1fbcef1366d6b822ec610fc031b3c (patch) | |
tree | 940ba55f0f27e8884332eaf90c11da48d5e98980 /libsolidity/parsing/Token.cpp | |
parent | 0fb4cb1ab9bb4b6cc72e28cc5a1753ad14781f14 (diff) | |
parent | 2abfdb65c8dcda6866143280b7ff1bde094a1419 (diff) | |
download | dexon-solidity-c2215d4605d1fbcef1366d6b822ec610fc031b3c.tar dexon-solidity-c2215d4605d1fbcef1366d6b822ec610fc031b3c.tar.gz dexon-solidity-c2215d4605d1fbcef1366d6b822ec610fc031b3c.tar.bz2 dexon-solidity-c2215d4605d1fbcef1366d6b822ec610fc031b3c.tar.lz dexon-solidity-c2215d4605d1fbcef1366d6b822ec610fc031b3c.tar.xz dexon-solidity-c2215d4605d1fbcef1366d6b822ec610fc031b3c.tar.zst dexon-solidity-c2215d4605d1fbcef1366d6b822ec610fc031b3c.zip |
Merge pull request #2667 from ethereum/develop
Merge develop into release in proparation for 0.4.14
Diffstat (limited to 'libsolidity/parsing/Token.cpp')
-rw-r--r-- | libsolidity/parsing/Token.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libsolidity/parsing/Token.cpp b/libsolidity/parsing/Token.cpp index 66312f69..9cec0303 100644 --- a/libsolidity/parsing/Token.cpp +++ b/libsolidity/parsing/Token.cpp @@ -70,7 +70,7 @@ void ElementaryTypeNameToken::assertDetails(Token::Value _baseType, unsigned con else if (_baseType == Token::UFixedMxN || _baseType == Token::FixedMxN) { solAssert( - _first + _second <= 256 && _first % 8 == 0 && _second % 8 == 0, + _first >= 8 && _first <= 256 && _first % 8 == 0 && _second <= 80, "No elementary type " + string(Token::toString(_baseType)) + to_string(_first) + "x" + to_string(_second) + "." ); } @@ -157,12 +157,8 @@ tuple<Token::Value, unsigned int, unsigned int> Token::fromIdentifierOrKeyword(s ) { int n = parseSize(positionX + 1, _literal.end()); if ( - 0 <= m && m <= 256 && - 8 <= n && n <= 256 && - m + n > 0 && - m + n <= 256 && - m % 8 == 0 && - n % 8 == 0 + 8 <= m && m <= 256 && m % 8 == 0 && + 0 <= n && n <= 80 ) { if (keyword == Token::UFixed) return make_tuple(Token::UFixedMxN, m, n); |