From df08d79623302d8eb234402c2f4f00f2b06d7646 Mon Sep 17 00:00:00 2001 From: Albert Date: Wed, 28 Nov 2018 13:23:19 +0100 Subject: Fix #5470 Remove unary + from the type system --- test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol | 1 + 1 file changed, 1 insertion(+) (limited to 'test/libsolidity') 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 -- cgit From eee2f2b069982fcd76846be98f7361b45d0c46b2 Mon Sep 17 00:00:00 2001 From: Albert Date: Thu, 6 Dec 2018 01:45:37 +0100 Subject: Update test --- test/libsolidity/SolidityExpressionCompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/libsolidity') 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"}}); -- cgit