solidity/test/libsolidity/smtCheckerTests/typecast/enum_from_uint.sol
2020-07-23 18:49:03 +02:00

16 lines
429 B
Solidity

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);
}
}
// ----
// Warning 6328: (140-160): Assertion violation happens here
// Warning 8364: (132-133): Assertion checker does not yet implement type type(enum C.D)
// Warning 5084: (132-136): Type conversion is not yet fully supported and might yield false positives.