implement visitor for dsymbol and type (need for #2074)