Merge pull request #5514 from corollari/develop

Remove unary + from the type system
This commit is contained in:
chriseth
2018-12-06 10:27:09 +01:00
committed by GitHub
3 changed files with 5 additions and 5 deletions
@@ -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"}});
@@ -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