diff options
author | chriseth <chris@ethereum.org> | 2018-12-06 17:27:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 17:27:09 +0800 |
commit | 5fde279d2adaa38681a85a550ea1c2cd1e3ae09a (patch) | |
tree | 380d6c8d68df976d16665ac566090ed43ac8f13d /test | |
parent | 5a08ae5e719820ba6d34a66187304747cf5c061f (diff) | |
parent | eee2f2b069982fcd76846be98f7361b45d0c46b2 (diff) | |
download | dexon-solidity-5fde279d2adaa38681a85a550ea1c2cd1e3ae09a.tar.gz dexon-solidity-5fde279d2adaa38681a85a550ea1c2cd1e3ae09a.tar.zst dexon-solidity-5fde279d2adaa38681a85a550ea1c2cd1e3ae09a.zip |
Merge pull request #5514 from corollari/develop
Remove unary + from the type system
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityExpressionCompiler.cpp | 2 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/test/libsolidity/SolidityExpressionCompiler.cpp b/test/libsolidity/SolidityExpressionCompiler.cpp index 8bce26c1..f5c4dc5e 100644 --- a/test/libsolidity/SolidityExpressionCompiler.cpp +++ b/test/libsolidity/SolidityExpressionCompiler.cpp @@ -366,7 +366,7 @@ BOOST_AUTO_TEST_CASE(unary_operators) { char const* sourceCode = R"( contract test { - function f(int y) { !(~+- y == 2); } + function f(int y) { !(~- y == 2); } } )"; bytes code = compileFirstExpression(sourceCode, {}, {{"test", "f", "y"}}); diff --git a/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol b/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol index 5646c43b..f2542d90 100644 --- a/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol +++ b/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol @@ -6,3 +6,4 @@ contract test { } // ---- // SyntaxError: (70-72): Use of unary + is disallowed. +// TypeError: (70-72): Unary operator + cannot be applied to type uint256 |