Make narrowing cast explicit
Merge pull request #3768 from yebblies/paintAsTypeddmd

[DDMD] Make narrowing cast explicit