SRI-CSL / solidity

This is solc-verify, a modular verifier for Solidity.
https://github.com/SRI-CSL/solidity/blob/boogie/SOLC-VERIFY-README.md
GNU General Public License v3.0
50 stars 14 forks source link

Error: Unsupported emit statement, could not determine event #150

Closed dddejan closed 4 years ago

dddejan commented 4 years ago
contract A { event e(uint a, string b); }
contract C is A {
    function f() public {
        emit A.e(2, "abc");
        emit A.e({b: "abc", a: 8});
    }
}

gives

Solc command: /root/project/build/solc/solc  --boogie test/libsolidity/syntaxTests/nameAndTypeResolution/562_event_emit_foreign_class.sol -o /tmp/tmphghs9ke1 --overwrite --boogie-arith int
Error while running compiler, details:
Warning: This is a pre-release compiler version, please do not use it in production.
test/libsolidity/syntaxTests/nameAndTypeResolution/562_event_emit_foreign_class.sol:1:1: Warning: Source file does not specify required compiler version!
contract A { event e(uint a, string b); }
^ (Relevant source part starts here and spans across multiple lines).

======= Converting to Boogie IVL =======

======= test/libsolidity/syntaxTests/nameAndTypeResolution/562_event_emit_foreign_class.sol =======
test/libsolidity/syntaxTests/nameAndTypeResolution/562_event_emit_foreign_class.sol:4:9: solc-verify error: Unsupported emit statement, could not determine event
        emit A.e(2, "abc");
        ^----------------^
test/libsolidity/syntaxTests/nameAndTypeResolution/562_event_emit_foreign_class.sol:5:9: solc-verify error: Unsupported emit statement, could not determine event
        emit A.e({b: "abc", a: 8});
        ^------------------------^
hajduakos commented 4 years ago

Fixed in 543814a (on 0.7 branch)