solidity/test/libsolidity/smtCheckerTests/special/abi_decode_simple.sol
Alex Beregszaszi 6edfdff187 [SMTChecker] Do not warn on "abi" as an identifer
There is an approprate warning for the function call.
2020-09-24 13:57:42 +01:00

22 lines
1.0 KiB
Solidity

pragma experimental SMTChecker;
contract C {
function f() public pure {
(uint a1, bytes32 b1, C c1) = abi.decode("abc", (uint, bytes32, C));
(uint a2, bytes32 b2, C c2) = abi.decode("abc", (uint, bytes32, C));
// False positive until abi.* are implemented as uninterpreted functions.
assert(a1 == a2);
assert(a1 != a2);
}
}
// ----
// Warning 2072: (85-95): Unused local variable.
// Warning 2072: (97-101): Unused local variable.
// Warning 2072: (156-166): Unused local variable.
// Warning 2072: (168-172): Unused local variable.
// Warning 6328: (293-309): Assertion violation happens here.
// Warning 6328: (313-329): Assertion violation happens here.
// Warning 8364: (139-140): Assertion checker does not yet implement type type(contract C)
// Warning 4588: (105-142): Assertion checker does not yet implement this type of function call.
// Warning 8364: (210-211): Assertion checker does not yet implement type type(contract C)
// Warning 4588: (176-213): Assertion checker does not yet implement this type of function call.