aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/controlFlow/unreachableCode/do_while_continue.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/controlFlow/unreachableCode/do_while_continue.sol')
-rw-r--r--test/libsolidity/syntaxTests/controlFlow/unreachableCode/do_while_continue.sol12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/controlFlow/unreachableCode/do_while_continue.sol b/test/libsolidity/syntaxTests/controlFlow/unreachableCode/do_while_continue.sol
new file mode 100644
index 00000000..363c53e1
--- /dev/null
+++ b/test/libsolidity/syntaxTests/controlFlow/unreachableCode/do_while_continue.sol
@@ -0,0 +1,12 @@
+contract C {
+ function f() public pure {
+ do {
+ uint a = 42; a;
+ continue;
+ return; // this is unreachable
+ } while(false);
+ return; // this is still reachable
+ }
+}
+// ----
+// Warning: (119-126): Unreachable code.