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

Add support to top level variables #1032

Merged
merged 2 commits into from
Feb 8, 2022
Merged

Conversation

montyly
Copy link
Member

@montyly montyly commented Feb 2, 2022

Fix #995

Example:

# top_level_variable.sol
uint constant A = 10;

struct St{
    uint[A] b;
}

function f() returns(uint){
    return A;
}

contract T{
    function g() public{
        f();
    }

}
# top_level_variable2.sol
import "./top_level_variable.sol";

contract T2{

    function h(uint[A] memory) public{
    }
}

TODO:

  • Add the parsing tests
  • Do more tests on the parsing on real contracts

@montyly montyly merged commit 3172b02 into dev Feb 8, 2022
@montyly montyly deleted the dev-add-top-level-variables branch February 8, 2022 17:22
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.

1 participant