On Friday, 13 October 2017 at 07:47:55 UTC, Daniel Kozak wrote:
but it works ok with immutable, so until you really need to change bar you can useimmutable bar = 9; foo!byte(bar + 1);
As Adam wrote two days ago: 'D doesn't do implicit narrowing conversion... so x + 1 becomes int, but then int to byte requires an explicit cast (unless the compiler can prove the range in that particular expression - this is called "value range propagation").'