Fixed upcasting for JDoc