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

Cannot follow for iteration variables #34

Open
kunos opened this issue Dec 13, 2024 · 1 comment
Open

Cannot follow for iteration variables #34

kunos opened this issue Dec 13, 2024 · 1 comment
Assignees

Comments

@kunos
Copy link
Contributor

kunos commented Dec 13, 2024

minimal repro:


Monster :: struct {
    name: string;
    powahh: float;
}

main :: () {
    monsters: [..]Monster;

    for m : monsters {
        m.name = "pippo"; // Won't navigate to "name"
    }

    
    for m : monsters {
        m. // won't complete
    }

    for monsters {
        it. // won't complete
    }

    for *m : monsters {
        m. // Won't complete
    }
}

@kunos
Copy link
Contributor Author

kunos commented Dec 14, 2024

Just wanted to update that I am working on this and got at a good stage. I will be testing it with my codebase for a couple of days and then submit a PR if it looks safe. For now covers simple cases, "it" implicit iterators, and arrays coming from procedures:
image

Maybe @SogoCZE you want to assign this to me so it shows.

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

No branches or pull requests

1 participant