aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 0de89aa1..b98c3706 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -5492,6 +5492,14 @@ BOOST_AUTO_TEST_CASE(bare_revert)
CHECK_WARNING(text, "Statement has no effect.");
}
+BOOST_AUTO_TEST_CASE(bare_others)
+{
+ CHECK_WARNING("contract C { function f() { selfdestruct; } }", "Statement has no effect.");
+ CHECK_WARNING("contract C { function f() { assert; } }", "Statement has no effect.");
+ CHECK_WARNING("contract C { function f() { require; } }", "Statement has no effect.");
+ CHECK_WARNING("contract C { function f() { suicide; } }", "Statement has no effect.");
+}
+
BOOST_AUTO_TEST_CASE(pure_statement_in_for_loop)
{
char const* text = R"(