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

Pattern variables are not visible from initializers in child scope #944

Open
MikePopoloski opened this issue Apr 7, 2024 · 0 comments
Open
Labels

Comments

@MikePopoloski
Copy link
Owner

module m;
    int i;
    always_comb begin
        if (i matches .a) begin
            automatic int pc = a; // 5
        end
    end
endmodule

This reports an error, but works if pc is declared in a parent scope and just assigned on line 5 instead.

@MikePopoloski MikePopoloski changed the title Pattern variables are visible from initializers in child scope Pattern variables are not visible from initializers in child scope Apr 7, 2024
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