diff --git a/src/d/semantic/caster.d b/src/d/semantic/caster.d index 16c4d5626..9e1769ad3 100644 --- a/src/d/semantic/caster.d +++ b/src/d/semantic/caster.d @@ -327,11 +327,16 @@ struct Caster(bool isExplicit, alias bailoutOverride = null) { bt = unsigned(bt); if (ut == bt) { return CastKind.Bit; - } else if (ut < bt) { + } + + if (ut < bt) { return isSigned(t) ? CastKind.SPad : CastKind.UPad; - } else static if (isExplicit) { + } + + static if (isExplicit) { return CastKind.Trunc; } else { + // This will trigger VRP. return bailout(t); }