Skip to content

v0.18.0 - "TypeError: Cannot read properties of null (reading 'accept')" when parsing old-style value transfers msg.sender.send{1 ETH}() #116

@tintinweb

Description

@tintinweb

Hey 👋,

was about to update https://github.com/tintinweb/solidity-workspace/ to v0.18.0 and one of my test-cases fired with an unhandled exception. Afaik the statement causing this is a - now - obsolete form of an eth value transfer. This used to throw a more meaningful error in the previous version. Please kindly let me know if this is expected behavior or if this should throw something more meaningful (expected).

Thanks!


Testcase: https://github.com/tintinweb/solidity-workspace/blob/master/examples/learnSolidity.sol#L61-L62

msg.sender.send{1 ETH}(); //this is actually illegal - note missing 'value:'
RandomContract(lol).doSomething{value: 1 ETH}();

Leads to unhandled exception:

./js/solidity-workspace/node_modules/@solidity-parser/parser/dist/index.cjs.js:3252
    }, this) : t2.accept(this);
                  ^

TypeError: Cannot read properties of null (reading 'accept')

refs: tintinweb/solidity-workspace#4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions