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

Lookup result source ranges can be incorrect when there are select expressions #1203

Open
MikePopoloski opened this issue Jan 4, 2025 · 0 comments
Labels

Comments

@MikePopoloski
Copy link
Owner

For example:

module m;
    initial begin
        automatic struct { logic [3:0][1:0] i; } i;
        static logic j = i.i[0][1];
    end
endmodule

Results in:

source.sv:4:26: error: cannot refer to automatic variable 'i' from static initializer
        static logic j = i.i[0][1];
                         ^~~~~~~~~

Note the source range includes the selectors instead of pointing to the variable reference itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant