handle abstract casts on type parameter assignment (closes #1877)