MikePopoloski/slang

Pattern variables are not visible from initializers in child scope

MikePopoloski opened this issue · 0 comments

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.