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

16 lines
414 B
Solidity
Raw Normal View History

2019-03-06 00:10:43 +00:00
pragma experimental SMTChecker;
contract C
{
enum D { Left, Right }
function f(uint x) public pure {
require(x == 0);
D _a = D(x);
assert(_a == D.Left);
}
}
// ----
2019-11-15 13:48:11 +00:00
// Warning: (132-133): Assertion checker does not yet implement type type(enum C.D)
2019-03-06 00:10:43 +00:00
// Warning: (132-136): Type conversion is not yet fully supported and might yield false positives.
// Warning: (140-160): Assertion violation happens here