Merge pull request #3671 from zachjs/master

Add test for typenames using constants shadowed later on
This commit is contained in:
Jannis Harder 2023-02-15 13:04:43 +01:00 committed by GitHub
commit 68480dfa19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,12 @@
module top;
localparam W = 5;
typedef logic [W-1:0] T;
T x; // width 5
if (1) begin : blk
localparam W = 10;
typedef T U;
typedef logic [W-1:0] V;
U y; // width 5
V z; // width 10
end
endmodule

View File

@ -0,0 +1,4 @@
read_verilog -sv typedef_const_shadow.sv
select -assert-count 1 w:x s:5 %i
select -assert-count 1 w:blk.y s:5 %i
select -assert-count 1 w:blk.z s:10 %i