mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Remove unsound assertion (too strong)
This commit is contained in:
parent
22776cddcd
commit
6606a13ed2
@ -1264,8 +1264,6 @@ SecondarySourceLocation SMTEncoder::callStackMessage(vector<CallStackEntry> cons
|
||||
for (auto const& call: _callStack | boost::adaptors::reversed)
|
||||
if (call.second)
|
||||
callStackLocation.append("", call.second->location());
|
||||
// The first function in the tx has no FunctionCall.
|
||||
solAssert(_callStack.front().second == nullptr, "");
|
||||
return callStackLocation;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract C {
|
||||
uint x = f(2);
|
||||
|
||||
function f(uint y) internal pure returns (uint) {
|
||||
assert(y > 1000);
|
||||
return y;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (116-132): Assertion violation happens here
|
||||
// Warning: (116-132): Assertion violation happens here
|
Loading…
Reference in New Issue
Block a user