Skip to content

Commit 8f832f9

Browse files
apullinclaude
andcommitted
Add regression test for #1217: Unpacked array literal parsing
This bug was fixed by commit ceaabc4 (Fix #1265). The error 'scalar type is not a valid context for assignment pattern' no longer occurs for unpacked array literals in continuous assignments. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0d67116 commit 8f832f9

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

ivtest/ivltests/br_gh1217.v

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Test for GitHub issue #1217
2+
// Unpacked array literal parsing
3+
module a(output bit b [0:0]);
4+
assign b = '{'b0};
5+
endmodule
6+
7+
module test;
8+
wire bit out_b [0:0];
9+
10+
a dut(.b(out_b));
11+
12+
initial begin
13+
#1;
14+
if (out_b[0] !== 1'b0) begin
15+
$display("FAILED: out_b[0] = %b, expected 0", out_b[0]);
16+
$finish;
17+
end
18+
$display("PASSED");
19+
end
20+
endmodule

ivtest/regress-sv.list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ br_gh782b normal,-g2009 ivltests gold=br_gh782b.gold
229229
br_gh800 normal,-g2009 ivltests
230230
br_gh801 normal,-g2012 ivltests
231231
br_gh801b normal,-g2012 ivltests
232+
br_gh1217 normal,-g2012 ivltests
232233
br_gh1220 normal,-g2012 ivltests
233234
br_gh1222 CE,-g2009 ivltests gold=br_gh1222.gold
234235
br_gh1223a normal,-g2009 ivltests

0 commit comments

Comments
 (0)