From dff1a26f55adc54ccfddfa9d2e87f1dab719d8ca Mon Sep 17 00:00:00 2001 From: RJ Catalano Date: Fri, 11 Mar 2016 15:27:56 -0600 Subject: [PATCH] fix for token bug, also quick fix for the wei and seconds --- libsolidity/parsing/Token.cpp | 2 +- test/libsolidity/SolidityNameAndTypeResolution.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libsolidity/parsing/Token.cpp b/libsolidity/parsing/Token.cpp index ef817d5d0..d37865241 100644 --- a/libsolidity/parsing/Token.cpp +++ b/libsolidity/parsing/Token.cpp @@ -153,7 +153,7 @@ tuple Token::fromIdentifierOrKeyword(s positionM < positionX && positionX < _literal.end() && *positionX == 'x' && - all_of(positionX + 1, _literal.end(), ::isdigit) + all_of(positionX++, _literal.end(), ::isdigit) ) { int n = parseSize(positionX + 1, _literal.end()); if ( diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index c078dc103..9ead3dcd2 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -3617,7 +3617,7 @@ BOOST_AUTO_TEST_CASE(fixed_type_literal_seconds_and_wei) } } )"; - BOOST_CHECK(success(text)); + BOOST_CHECK(!success(text)); } BOOST_AUTO_TEST_CASE(array_declaration_with_fixed_literal)