This is how it is done by scaladoc now, lots of casts. It would make sense to rework the design, but this is a major change that should be probably handled in master.