package_scope_conflict_7.sv 329 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// pattern: import of Q::X conflicts with prior import of P::X
package P;
    localparam X = 1;
endpackage
package Q;
    localparam X = 2;
endpackage
module top;
    import P::*;
    if (1) begin : blk1
        // forces import of P::X at the top level
        initial $display(X);
    end
    import Q::X; // illegal
endmodule