From 8ca69ed8d86efe8058cb1001ab4c2609dbe297da Mon Sep 17 00:00:00 2001 From: Christian Parpart Date: Tue, 3 Jul 2018 11:10:14 +0200 Subject: defaulting to v0.5.0 behaviour of unary + operator (disallow); also adapting all tests to it --- .../308_rational_unary_plus_operation.sol | 2 +- .../309_rational_unary_plus_assignment.sol | 8 -------- .../310_rational_unary_plus_operation_v050.sol | 10 ---------- .../311_rational_unary_plus_assignment_v050.sol | 9 --------- test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol | 8 ++++++++ 5 files changed, 9 insertions(+), 28 deletions(-) delete mode 100644 test/libsolidity/syntaxTests/nameAndTypeResolution/309_rational_unary_plus_assignment.sol delete mode 100644 test/libsolidity/syntaxTests/nameAndTypeResolution/310_rational_unary_plus_operation_v050.sol delete mode 100644 test/libsolidity/syntaxTests/nameAndTypeResolution/311_rational_unary_plus_assignment_v050.sol create mode 100644 test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol (limited to 'test/libsolidity/syntaxTests') diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/308_rational_unary_plus_operation.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/308_rational_unary_plus_operation.sol index eb7c6ea9..f635a214 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/308_rational_unary_plus_operation.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/308_rational_unary_plus_operation.sol @@ -6,4 +6,4 @@ contract test { } } // ---- -// Warning: (70-75): Use of unary + is deprecated. +// SyntaxError: (70-75): Use of unary + is disallowed. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/309_rational_unary_plus_assignment.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/309_rational_unary_plus_assignment.sol deleted file mode 100644 index a5bdd6c8..00000000 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/309_rational_unary_plus_assignment.sol +++ /dev/null @@ -1,8 +0,0 @@ -contract test { - function f(uint x) pure public { - uint y = +x; - y; - } -} -// ---- -// Warning: (70-72): Use of unary + is deprecated. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/310_rational_unary_plus_operation_v050.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/310_rational_unary_plus_operation_v050.sol deleted file mode 100644 index 140655af..00000000 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/310_rational_unary_plus_operation_v050.sol +++ /dev/null @@ -1,10 +0,0 @@ -pragma experimental "v0.5.0"; -contract test { - function f() pure public { - ufixed16x2 a = +3.25; - fixed16x2 b = -3.25; - a; b; - } -} -// ---- -// SyntaxError: (100-105): Use of unary + is deprecated. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/311_rational_unary_plus_assignment_v050.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/311_rational_unary_plus_assignment_v050.sol deleted file mode 100644 index 7e5c0feb..00000000 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/311_rational_unary_plus_assignment_v050.sol +++ /dev/null @@ -1,9 +0,0 @@ -pragma experimental "v0.5.0"; -contract test { - function f(uint x) pure public { - uint y = +x; - y; - } -} -// ---- -// SyntaxError: (100-102): Use of unary + is deprecated. diff --git a/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol b/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol new file mode 100644 index 00000000..5646c43b --- /dev/null +++ b/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol @@ -0,0 +1,8 @@ +contract test { + function f(uint x) pure public { + uint y = +x; + y; + } +} +// ---- +// SyntaxError: (70-72): Use of unary + is disallowed. -- cgit