MikePopoloski / slang

SystemVerilog compiler and language services
MIT License
558 stars 122 forks source link

Incorrect compilation errors with expressions like "=> ##[X]" #1004

Closed vineet-chipstack closed 1 month ago

vineet-chipstack commented 1 month ago

Describe the bug An expression like "=> ##[X]" should report compilation errors

To Reproduce


module test(
    input logic A,
    input logic B,
    input logic clk
);
assert property (@(posedge clk) A |=> ##[C] B);
endmodule

Copy paste into https://sv-lang.com/explore/ Gives 0 errors, 0 warnings

Additional context Note C is undeclared.

When run with Jasper, it complains about the square brackets.

assert property (@(posedge clk) A |=> ##C B); Slang here correctly raises the error regarding C being undeclared.

MikePopoloski commented 1 month ago

Fixed in e5e917954b33041af99859d6f5fec791bff46b4f