mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Supporting conditional operator
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract C {
|
||||
function f(bool b) public pure {
|
||||
require(b);
|
||||
uint c = b ? 5 : 1;
|
||||
assert(c < 5);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6328: (118-131): Assertion violation happens here
|
||||
// Warning 6838: (105-106): Condition is always true.
|
||||
Reference in New Issue
Block a user