uvm_config_db#(T) labels uniqness within same scope

In reply to jkpatel:

It is valid and it gets the int & string respectively when using the get.

`include "uvm_macros.svh"
import uvm_pkg::*;

class test extends uvm_test;
  `uvm_component_utils(test)
  
  function new(string name = "test", uvm_component parent);
    super.new(name, parent);
  endfunction
  
  int cnt;
  string str;
  
  function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    void'(uvm_config_db#(int)::get(null,"*", "counter", cnt));
    void'(uvm_config_db#(string)::get(null, "*", "counter", str));
    $display(cnt,str);
  endfunction
  
endclass

  module aaa;

    int cnt;
    string str;
    test t1;
    
    initial begin
      	cnt = 10;
      	str = "AA";
		uvm_config_db#(int)::set(uvm_root::get(),"*","counter",cnt);
		uvm_config_db#(string)::set(uvm_root::get(),"*","counter",str);
      t1 = test::type_id::create("test",null);
      run_test();
    end
  endmodule