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

Use unique variable name for yul variable #648

Merged
merged 2 commits into from
Sep 29, 2020
Merged

Conversation

montyly
Copy link
Member

@montyly montyly commented Sep 29, 2020

Add a unique name for yul variables to prevent lookup issue (fix #647)

Testcase:

contract C{
    function f() public{
        if(true) {
            assembly{
                let a := 10
                for {} true {} {
                    a := add(a, 1)
                }
            }
        }
        else{
            assembly{
                let a := 10
                for {} true {} {
                    a := add(a, 1)
                }
            }
        }
    }
}

@montyly montyly requested a review from samczsun September 29, 2020 06:41
@montyly montyly merged commit 081a071 into dev Sep 29, 2020
@montyly montyly deleted the dev-fix-yul-variable-lookup branch October 6, 2020 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants