Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Require statement with constant string field #120

Open
beillahi opened this issue Dec 3, 2019 · 2 comments
Open

Require statement with constant string field #120

beillahi opened this issue Dec 3, 2019 · 2 comments

Comments

@beillahi
Copy link

beillahi commented Dec 3, 2019

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 as#t_arr_type to int_arr_ptr)
1 type checking errors detected in /tmp/tmp505k52p_/test9.sol.bpl
@hajduakos
Copy link
Member

I'll have to check but I think we can just simply ignore the second argument of require as it is only a message.

@hajduakos
Copy link
Member

This is actually a special case of #123

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants