solidity/test/libsolidity/smtCheckerTests/operators/conditional_assignment_4.sol
2021-04-08 21:03:39 +02:00

26 lines
436 B
Solidity

abstract contract D {
function d() public virtual ;
}
contract C {
bool a;
uint x;
D d;
function g() public returns (uint) {
x = 2;
return x;
}
function f(bool b) public {
x = 1;
uint y = b ? g() : 3;
assert(x == 2 || x == 1);
}
function h() public {
x = 3;
}
}
// ====
// SMTEngine: all
// ----
// Warning 2072: (240-246): Unused local variable.