solidity/test/libsolidity/smtCheckerTests/typecast/cast_smaller_1.sol

13 lines
269 B
Solidity
Raw Normal View History

2018-12-20 12:20:07 +00:00
pragma experimental SMTChecker;
contract C
{
function f(uint16 x) public pure {
uint8 y = uint8(x);
// True because of y's type
assert(y < 300);
}
}
// ----
// Warning 5084: (94-102): Type conversion is not yet fully supported and might yield false positives.