Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Named function parameter calls parsed incorrectly #307

Open
arxenix opened this issue Jul 29, 2019 · 0 comments
Open

Named function parameter calls parsed incorrectly #307

arxenix opened this issue Jul 29, 2019 · 0 comments
Labels
bug Something isn't working ir

Comments

@arxenix
Copy link
Contributor

arxenix commented Jul 29, 2019

function subCall(uint a, uint b) public pure returns(uint) {
    return sub({arg2: b, arg1: a});
}

function sub(uint arg1, uint arg2) public pure returns(uint) {
    return arg1 - arg2;
}

Output:

 Function FunctionCalls.subCall(uint256,uint256)
                Expression: sub(b,a)
                IRs:
                        TMP_15(uint256) = INTERNAL_CALL, FunctionCalls.sub(uint256,uint256)(b,a)
                        RETURN TMP_15

Expected:

 Function FunctionCalls.subCall(uint256,uint256)
                Expression: sub(a,b)
                IRs:
                        TMP_15(uint256) = INTERNAL_CALL, FunctionCalls.sub(uint256,uint256)(a,b)
                        RETURN TMP_15
@0xalpharush 0xalpharush added the bug Something isn't working label Jun 24, 2022
@0xalpharush 0xalpharush added the ir label Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ir
Projects
None yet
Development

No branches or pull requests

2 participants