diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/controlFlow/unreachableCode/for_break.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/controlFlow/unreachableCode/for_break.sol | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/controlFlow/unreachableCode/for_break.sol b/test/libsolidity/syntaxTests/controlFlow/unreachableCode/for_break.sol new file mode 100644 index 00000000..496addb2 --- /dev/null +++ b/test/libsolidity/syntaxTests/controlFlow/unreachableCode/for_break.sol @@ -0,0 +1,12 @@ +contract C { + function f() public pure { + for (uint a = 0; a < 1; a++) { + break; + uint b = 42; b; + } + return; + } +} +// ---- +// Warning: (76-79): Unreachable code. +// Warning: (114-128): Unreachable code. |