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

13 lines
330 B
Solidity
Raw Normal View History

pragma experimental SMTChecker;
contract C {
function g() public pure returns (bytes32 val) { return "abc"; }
function f1() public pure returns (bytes32 val) { return g(); }
function a() public pure {
assert(f1() == "abc");
assert(f1() == "cde");
}
}
// ----
// Warning: (238-259): Assertion violation happens here