diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/controlFlow/unreachableCode/while_continue.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/controlFlow/unreachableCode/while_continue.sol | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/controlFlow/unreachableCode/while_continue.sol b/test/libsolidity/syntaxTests/controlFlow/unreachableCode/while_continue.sol new file mode 100644 index 00000000..55f98f67 --- /dev/null +++ b/test/libsolidity/syntaxTests/controlFlow/unreachableCode/while_continue.sol @@ -0,0 +1,11 @@ +contract C { + function f() public pure { + while(true) { + continue; + return; + } + return; // this is unreachable as well, but currently undetected (needs to consider constant condition "true") + } +} +// ---- +// Warning: (100-107): Unreachable code. |