mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Fix class type as an associative array parameter (#4997).
This commit is contained in:
parent
6ffff8565f
commit
93e5ca3f6d
1
Changes
1
Changes
@ -33,6 +33,7 @@ Verilator 5.023 devel
|
||||
* Fix assignment of null into struct member (#4952).
|
||||
* Fix object assignment from conditionals (#4968).
|
||||
* Fix unpacked structure upper bit cleaning (#4978).
|
||||
* Fix class type as an associative array parameter (#4997).
|
||||
|
||||
|
||||
Verilator 5.022 2024-02-24
|
||||
|
@ -469,7 +469,7 @@ public:
|
||||
this->elementsp(elementsp);
|
||||
}
|
||||
ASTGEN_MEMBERS_AstBracketArrayDType;
|
||||
bool similarDType(const AstNodeDType* samep) const override { V3ERROR_NA_RETURN(false); }
|
||||
bool similarDType(const AstNodeDType* samep) const override { return same(samep); }
|
||||
AstNodeDType* subDTypep() const override VL_MT_STABLE { return childDTypep(); }
|
||||
// METHODS
|
||||
// Will be removed in V3Width, which relies on this
|
||||
|
@ -43,26 +43,35 @@ class Baz #(type T=Foo1);
|
||||
endfunction
|
||||
endclass
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
);
|
||||
class WBase;
|
||||
endclass
|
||||
|
||||
class Wrapper#(type VAL_T=int);
|
||||
VAL_T value;
|
||||
endclass
|
||||
|
||||
module t (/*AUTOARG*/);
|
||||
|
||||
typedef WBase wrap_map_t[string];
|
||||
typedef WBase wrap_queue_t[$];
|
||||
|
||||
initial begin
|
||||
Bar bar_i = new;
|
||||
Baz baz_1_i = new;
|
||||
Baz #(Foo2) baz_2_i = new;
|
||||
|
||||
Wrapper#(wrap_map_t) wrap_map = new();
|
||||
Wrapper#(wrap_queue_t) wrap_queue = new();
|
||||
|
||||
bar_i.set(1);
|
||||
baz_1_i.set(2);
|
||||
baz_2_i.set(3);
|
||||
|
||||
if (bar_i.get(1).get_x() == 1 &&
|
||||
baz_1_i.get(2).get_x() == 1 &&
|
||||
baz_2_i.get(3).get_x() == 2) begin
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
else begin
|
||||
$stop;
|
||||
end
|
||||
if (bar_i.get(1).get_x() != 1) $stop;
|
||||
if (baz_1_i.get(2).get_x() != 1) $stop;
|
||||
if (baz_2_i.get(3).get_x() != 2) $stop;
|
||||
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
endmodule
|
||||
|
Loading…
Reference in New Issue
Block a user