Skip to content

Same-contract variable is accessed using internal scoping #288

@fulldecent

Description

@fulldecent

A contract accesses its own variable using scoped qualification.

Using more-complicated-than-necessary variable access makes code harder to read and invites hard-to-find bugs. For example accidently calling a function with external visibility when internal is appropriate will cost more gas and also produce incorrect results during initialization.

Recommendation: use direct variable access when possible. e.g. Deadline.getDeadline() -> _deadline.

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions