mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Take revert statement into account in control flow graph.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
==== Source: A ====
|
||||
|
||||
error E();
|
||||
|
||||
==== Source: B ====
|
||||
|
||||
error E();
|
||||
|
||||
==== Source: C ====
|
||||
|
||||
import "A" as A;
|
||||
import "B" as B;
|
||||
|
||||
contract Test {
|
||||
function f() public pure {
|
||||
revert A.E();
|
||||
}
|
||||
function g() public pure {
|
||||
revert B.E();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
contract C {
|
||||
error E();
|
||||
uint x = 2;
|
||||
function f() public {
|
||||
revert E();
|
||||
x = 4;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 5740: (98-103): Unreachable code.
|
||||
Reference in New Issue
Block a user