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 {
do {
uint a = 42; a;
continue;
return; // this is unreachable
} while(false);
return; // this is still reachable
}
}
// ----
// Warning: (119-126): Unreachable code.