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

Resolver should check for unused variables #11

Open
Gusarich opened this issue Jul 20, 2024 · 1 comment
Open

Resolver should check for unused variables #11

Gusarich opened this issue Jul 20, 2024 · 1 comment
Assignees
Labels
typechecking Type checking and resolving
Milestone

Comments

@Gusarich
Copy link
Owner

Gusarich commented Jul 20, 2024

For example, in the case below only the y variable is actually used and we don't need x at all.

house TestHouse {
    global counter: int = 0;

    handle(event: JoinEvent) {
        let x: int = 1;
        let y: int = 2;
        global.counter = global.counter + y;
    }
}

Same should apply for unused function arguments once #7 is resolved

@Gusarich Gusarich added the typechecking Type checking and resolving label Jul 20, 2024
@Gusarich Gusarich self-assigned this Jul 20, 2024
@Gusarich Gusarich modified the milestones: 0.2.0, 0.1.1, 0.3.0 Jul 21, 2024
@Gusarich
Copy link
Owner Author

Gusarich commented Aug 5, 2024

I think it'll be better to make it as Compilation Warning instead of a fatal error, so let's move it to the 1.0.0 milestone because it's not urgent at all

@Gusarich Gusarich modified the milestones: 0.3.0, 1.0.0 Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typechecking Type checking and resolving
Projects
None yet
Development

No branches or pull requests

1 participant