Fix symbol entries when inheriting classes (#3995) (#3996)

This commit is contained in:
Krzysztof Boroński 2023-03-06 13:43:58 +01:00 committed by GitHub
parent cc45f64280
commit f68c16a5e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 0 deletions

View File

@ -3362,6 +3362,8 @@ private:
}
}
}
m_ds.m_dotSymp = m_curSymp;
iterateChildren(nodep);
}
// V3Width when determines types needs to find enum values and such

View File

@ -0,0 +1,17 @@
#!/usr/bin/env perl
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# Copyright 2020 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
scenarios(vlt => 1);
compile(
);
ok(1);
1;

View File

@ -0,0 +1,15 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2022 by Antmicro Ltd.
// SPDX-License-Identifier: CC0-1.0
class Foo;
endclass
class Bar extends Foo;
int m_field = get_1();
function int get_1();
return 1;
endfunction
endclass