-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14980 from ethereum/smt-int-sorts-compatibility
SMTChecker: Relax assertions regarding sort compatibility when creating expressions
- Loading branch information
Showing
3 changed files
with
37 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
test/libsolidity/smtCheckerTests/types/mapping_integer_signedness_compatibility.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
|
||
|
||
// Regression for handling signedness, see issue #14792 | ||
contract C { | ||
mapping(int => int) v1; | ||
mapping(int => uint) v2; | ||
mapping(uint => int) v3; | ||
mapping(uint => uint) v4; | ||
mapping(bytes12 => int) v5; | ||
uint[5] a1; | ||
int[5] a2; | ||
|
||
function f() public { | ||
delete v1[0]; | ||
delete v2[0]; | ||
delete v3[0]; | ||
delete v4[0]; | ||
delete v5[0]; | ||
delete a1[0]; | ||
delete a2[0]; | ||
} | ||
} | ||
// ---- | ||
// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them. |