2018-12-20 12:20:07 +00:00
|
|
|
pragma experimental SMTChecker;
|
|
|
|
|
|
|
|
contract C
|
|
|
|
{
|
|
|
|
function f() public pure {
|
|
|
|
bytes2 a = 0x1234;
|
|
|
|
bytes4 b = bytes4(a); // b will be 0x12340000
|
|
|
|
// False positive since right padding is not supported yet.
|
|
|
|
assert(b == 0x12340000);
|
|
|
|
// This should fail (right padding).
|
|
|
|
assert(a == b);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2020-07-13 18:48:00 +00:00
|
|
|
// Warning 6328: (207-230): Assertion violation happens here
|
|
|
|
// Warning 6328: (273-287): Assertion violation happens here
|
2020-06-19 00:26:46 +00:00
|
|
|
// Warning 5084: (108-117): Type conversion is not yet fully supported and might yield false positives.
|