Do not emit cast if the type is View.

This avoids compiler warnings for redundant casts.
Merge pull request #69 from JakeWharton/jw/redundant-cast

Do not emit cast if the type is View.