Duplicate typedef definitions

In reply to alexgran:

Two other things you can do are:

Similar to Alex’s suggestion, you can explicitly import one of the typedefs so there would be no wildcard conflict

package C;
        import A::*;
        import A::t_dyn_byteArray;
        import B::*;
 
        t_dyn_byteArray foo;
endpackage

However, I would strongly discourage using the same identifier in two different packages where you intend to import both packages in the same scope. A better solution would be to create a common package and then export the identifers from that common package so that they would be imported as package A or B


package common;
  typedef bit [7:0] t_dyn_byteArray[];
endpackage
package A;
  import common::*;
  export common::t_dyn_byteArray;
 // other A stuff      
endpackage
 
package B;
  import common::*;
  export common::t_dyn_byteArray;
 // other B stuff      
endpackage
 
package C;
        import A::*;
        import B::*;
 
         t_dyn_byteArray foo; // no identifier conflict
endpackage