Mention 'transfer' in warning about unchecked 'send'.

This commit is contained in:
chriseth 2017-03-15 11:10:24 +01:00
parent d134fda0c0
commit ab178b8bac
2 changed files with 4 additions and 3 deletions

View File

@ -891,10 +891,11 @@ void TypeChecker::endVisit(ExpressionStatement const& _statement)
if (
location == Location::Bare ||
location == Location::BareCallCode ||
location == Location::BareDelegateCall ||
location == Location::Send
location == Location::BareDelegateCall
)
warning(_statement.location(), "Return value of low-level calls not used.");
else if (location == Location::Send)
warning(_statement.location(), "Failure condition of 'send' ignored. Consider using 'transfer' instead.");
}
}
}

View File

@ -4420,7 +4420,7 @@ BOOST_AUTO_TEST_CASE(unused_return_value_send)
}
}
)";
CHECK_WARNING(text, "Return value of low-level calls not used");
CHECK_WARNING(text, "Failure condition of 'send' ignored. Consider using 'transfer' instead.");
}
BOOST_AUTO_TEST_CASE(unused_return_value_call)