File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
regression/verilog/modules Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,11 @@ module main;
33 localparam [7 :0 ] foo = 1 ;
44 parameter [7 :0 ] bar = 2 ;
55
6+ // Parameters with type are "assignment contexts"
7+ localparam [7 :0 ] baz = 1'b1 + 1'b1 ;
8+
69 always assert property1: $bits(foo) == 8 ;
710 always assert property2: $bits(bar) == 8 ;
11+ always assert property3: baz == 2 ;
812
913endmodule
Original file line number Diff line number Diff line change @@ -1026,11 +1026,11 @@ void verilog_typecheckt::elaborate_symbol_rec(irep_idt identifier)
10261026 {
10271027 convert_expr (symbol.value );
10281028
1029+ // Convert to the given type. These are assignment contexts.
1030+ assignment_conversion (symbol.value , symbol.type );
1031+
10291032 if (!is_let)
10301033 symbol.value = elaborate_constant_expression_check (symbol.value );
1031-
1032- // Cast to the given type.
1033- propagate_type (symbol.value , symbol.type );
10341034 }
10351035 }
10361036 }
You can’t perform that action at this time.
0 commit comments