This: foreach (int i, color; [red, green, blue]) img.fillCircle(50 + i * 20, 30 + i * 10, 20 + i * 5, color); should not give an error about implicit conversion of 64 bit size_t to int, because the array's length is known to fit in an int. https://github.com/dlang/dmd/pull/8941#issuecomment-496306412
@ntrel created dlang/dmd pull request #16334 "Fix Bugzilla 24450 - apply VRP to foreach indices when array is of kn…" fixing this issue: - Fix Bugzilla 24450 - apply VRP to foreach indices when array is of known length https://github.com/dlang/dmd/pull/16334
dlang/dmd pull request #16334 "Fix Bugzilla 24450 - apply VRP to foreach indices when array is of kn…" was merged into master: - c63bb20c83b4452337ceff4d1bfc4ac25835935f by Nick Treleaven: Fix Bugzilla 24450 - apply VRP to foreach indices when array is of known length https://github.com/dlang/dmd/pull/16334