diff options
author | chriseth <chris@ethereum.org> | 2019-01-10 18:31:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-10 18:31:54 +0800 |
commit | 950e193642f46f9e0f66b639e8dda059d149635b (patch) | |
tree | 7206556c82cb5ce0e26f43680cfa8c7fb9213013 /test/libsolidity/syntaxTests/parsing | |
parent | a379873acce9da89609d6c2daac2ef785747f1ff (diff) | |
parent | 0dfd4a726eb7e6fa8a5e886a0d80bb5bf3d9b7dc (diff) | |
download | dexon-solidity-950e193642f46f9e0f66b639e8dda059d149635b.tar dexon-solidity-950e193642f46f9e0f66b639e8dda059d149635b.tar.gz dexon-solidity-950e193642f46f9e0f66b639e8dda059d149635b.tar.bz2 dexon-solidity-950e193642f46f9e0f66b639e8dda059d149635b.tar.lz dexon-solidity-950e193642f46f9e0f66b639e8dda059d149635b.tar.xz dexon-solidity-950e193642f46f9e0f66b639e8dda059d149635b.tar.zst dexon-solidity-950e193642f46f9e0f66b639e8dda059d149635b.zip |
Merge pull request #5765 from ethereum/unreachableCode
Warn about unreachable code.
Diffstat (limited to 'test/libsolidity/syntaxTests/parsing')
4 files changed, 6 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/parsing/for_loop_simple_initexpr.sol b/test/libsolidity/syntaxTests/parsing/for_loop_simple_initexpr.sol index fce669dd..9fafd706 100644 --- a/test/libsolidity/syntaxTests/parsing/for_loop_simple_initexpr.sol +++ b/test/libsolidity/syntaxTests/parsing/for_loop_simple_initexpr.sol @@ -7,6 +7,8 @@ contract test { } } // ---- +// Warning: (103-106): Unreachable code. +// Warning: (144-152): Unreachable code. // Warning: (33-42): Unused function parameter. Remove or comment out the variable name to silence this warning. // Warning: (122-131): Unused local variable. // Warning: (20-169): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/for_loop_simple_noexpr.sol b/test/libsolidity/syntaxTests/parsing/for_loop_simple_noexpr.sol index 4adf0948..c36f9c58 100644 --- a/test/libsolidity/syntaxTests/parsing/for_loop_simple_noexpr.sol +++ b/test/libsolidity/syntaxTests/parsing/for_loop_simple_noexpr.sol @@ -7,6 +7,7 @@ contract test { } } // ---- +// Warning: (144-152): Unreachable code. // Warning: (37-46): Unused function parameter. Remove or comment out the variable name to silence this warning. // Warning: (122-131): Unused local variable. // Warning: (24-177): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/for_loop_vardef_initexpr.sol b/test/libsolidity/syntaxTests/parsing/for_loop_vardef_initexpr.sol index c22ae42f..c81f611b 100644 --- a/test/libsolidity/syntaxTests/parsing/for_loop_vardef_initexpr.sol +++ b/test/libsolidity/syntaxTests/parsing/for_loop_vardef_initexpr.sol @@ -6,6 +6,8 @@ contract test { } } // ---- +// Warning: (89-92): Unreachable code. +// Warning: (130-138): Unreachable code. // Warning: (33-42): Unused function parameter. Remove or comment out the variable name to silence this warning. // Warning: (108-117): Unused local variable. // Warning: (20-155): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/while_loop.sol b/test/libsolidity/syntaxTests/parsing/while_loop.sol index dbb00a69..cdac929f 100644 --- a/test/libsolidity/syntaxTests/parsing/while_loop.sol +++ b/test/libsolidity/syntaxTests/parsing/while_loop.sol @@ -5,3 +5,4 @@ contract test { } } // ---- +// Warning: (105-113): Unreachable code. |