fix: first, print tree type; then, cast into bstree_impl base to print tree