dmd
dmd copied to clipboard
Templatize `_d_class_cast`
This PR introduces the templated version of _d_class_cast, cleaning up a bunch of code in e2ir.d.
I also had to add an additional check in expressionsem.d in case the casted expression is a variable, in which case its type needed to be stripped of shared. I am not sure if this is the cleanest or idiomatic way, but I am open to better solutions.