verilator/test_regress/t/t_fallback_bad.v

46 lines
707 B
Systemverilog
Raw Normal View History

// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2024 Antmicro Ltd
// SPDX-License-Identifier: CC0-1.0
int f = 5;
2026-03-08 23:26:40 +01:00
task tsk;
endtask
package pkg;
endpackage
module subm;
endmodule
module submo;
2026-03-08 23:26:40 +01:00
subm sub2 ();
endmodule
module t;
2026-03-08 23:26:40 +01:00
submo sub1 ();
2026-03-08 23:26:40 +01:00
class Base;
endclass
class Cls extends Base;
task calltsk;
super.tsk;
this.tsk;
super.f = 8;
this.f = 8;
sub1.sub2.tsk;
pkg::f = 8;
pkg::tsk();
sub1.sub2.f = 8;
sub1.sub2.f.f = 8;
endtask
endclass
2026-03-08 23:26:40 +01:00
Cls obj = new;
initial begin
obj.calltsk;
if (f != 5) $stop;
end
endmodule