Files
iverilog/ivtest/ivltests/sv_export_fail3.v
T
Lars-Peter Clausen d868983b9c Add regression tests for package export
Check that package exports are supported. Also check for various scenarios
where package exports should fail.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2023-01-17 06:22:35 -08:00

24 lines
460 B
Verilog

// Check that an identifier importable through a wildcard import is not exported
// through a wildcard export if the identifier has not been referenced in
// package.
package P1;
integer x = 123;
endpackage
package P2;
import P1::*;
export *::*;
endpackage
module test;
import P2::x; // This should fail, P1::x is not referenced in P2 and hence not
// exportable through P2
initial begin
$display("FAILED");
end
endmodule