Warn.onBadCast

Dst onBadCast(Dst, Src)(Src src)

Called automatically upon a bad cast from src to type Dst (one that loses precision or attempts to convert a negative value to an unsigned type).

Parameters

srcThe source of the cast
DstThe target type of the cast

Returns

cast(Dst) src