mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
22 lines
444 B
Solidity
22 lines
444 B
Solidity
pragma experimental SMTChecker;
|
|
contract C {
|
|
function f(bool x, bool y) public pure {
|
|
uint a;
|
|
if (x) {
|
|
if (y) {
|
|
a = 0;
|
|
} else {
|
|
a = 1;
|
|
}
|
|
} else {
|
|
if (y) {
|
|
a = 1;
|
|
} else {
|
|
a = 0;
|
|
}
|
|
}
|
|
bool xor_x_y = (x && !y) || (!x && y);
|
|
assert(!xor_x_y || a > 0);
|
|
}
|
|
}
|