mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Style and stricter tests.
This commit is contained in:
parent
e544698ad3
commit
96870686a9
@ -161,9 +161,7 @@ bool SyntaxChecker::visit(Break const& _breakStatement)
|
||||
bool SyntaxChecker::visit(UnaryOperation const& _operation)
|
||||
{
|
||||
if (_operation.getOperator() == Token::Add)
|
||||
{
|
||||
warning(_operation.location(), "Use of unary + is deprecated");
|
||||
}
|
||||
warning(_operation.location(), "Use of unary + is deprecated.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3943,7 +3943,7 @@ BOOST_AUTO_TEST_CASE(rational_unary_operation)
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_SUCCESS(text);
|
||||
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||
text = R"(
|
||||
contract test {
|
||||
function f() {
|
||||
@ -3953,6 +3953,14 @@ BOOST_AUTO_TEST_CASE(rational_unary_operation)
|
||||
}
|
||||
)";
|
||||
CHECK_WARNING(text,"Use of unary + is deprecated");
|
||||
text = R"(
|
||||
contract test {
|
||||
function f(uint x) {
|
||||
uint y = +x;
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_WARNING(text,"Use of unary + is deprecated");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(leading_zero_rationals_convert)
|
||||
|
Loading…
Reference in New Issue
Block a user