aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 9126806c..0de89aa1 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -5505,6 +5505,19 @@ BOOST_AUTO_TEST_CASE(pure_statement_in_for_loop)
CHECK_WARNING(text, "Statement has no effect.");
}
+BOOST_AUTO_TEST_CASE(pure_statement_check_for_regular_for_loop)
+{
+ char const* text = R"(
+ contract C {
+ function f() {
+ for (uint x = 0; true; x++)
+ {}
+ }
+ }
+ )";
+ success(text);
+}
+
BOOST_AUTO_TEST_SUITE_END()
}