Warn about unreachable code.

This commit is contained in:
Daniel Kirchner
2019-01-10 10:36:50 +01:00
parent 63319cfdcd
commit 0dfd4a726e
27 changed files with 258 additions and 12 deletions
@@ -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.