mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
15 lines
397 B
Solidity
15 lines
397 B
Solidity
pragma experimental SMTChecker;
|
|
|
|
contract C
|
|
{
|
|
function f() public pure {
|
|
uint32 a = 0x12345678;
|
|
uint16 b = uint16(a); // b will be 0x5678 now
|
|
// False positive since truncation is not supported yet.
|
|
assert(b == 0x5678);
|
|
}
|
|
}
|
|
// ----
|
|
// Warning: (112-121): Type conversion is not yet fully supported and might yield false positives.
|
|
// Warning: (208-227): Assertion violation happens here
|