solidity
solidity copied to clipboard
Require statement with constant string field
trafficstars
pragma solidity ^0.5.0;
contract test {
string constant a = "solc-verify" ;
function g() public {
require(true, a);
}
}
-----------------
Error while running verifier, details:
[TRACE] Using prover: /usr/bin/z3
Parsing /tmp/tmp505k52p_/test9.sol.bpl
/tmp/tmp505k52p_/test9.sol.bpl(23,1): Error: mismatched types in assignment command (cannot assign int_arr_type to int_arr_ptr)
1 type checking errors detected in /tmp/tmp505k52p_/test9.sol.bpl
I'll have to check but I think we can just simply ignore the second argument of require as it is only a message.
This is actually a special case of #123