It is not correct to assume that arg0 has been generated to have the
same IrType as the whole expression.
The reason it only backfired in throwing exceptions probably has to do
with the fact that visitThrow might be the only place in
ExpressionCodegen right now which uses the IrType from PromisedValue to
make a decision on whether to generate checkcast.
It seems suspicious that ExpressionCodegen.visitFieldAccess/visitCall
return PromisedValue whose IrType mentions type parameters which are
declared outside of the call site, but that should probably be
investigated separately.
#KT-48440 Fixed