Change single case pattern matches to casts.