Skip to content

State variables cannot have external visibility #5

@bitbart

Description

@bitbart

State variables can have visibility public, private or internal (default):

https://docs.soliditylang.org/en/latest/contracts.html#state-variable-visibility

The following contract should either not be parsable or should not pass typechecking:

contract C {
    int external x;
    constructor() { x = 1; }
    function f() external view returns (int) { return(x); }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions