This is fail253.d from the test suite. It prints "holahola". Changing inout into ref restores the original check in the test suite -- but I don't think this should compile. import std.stdio; void main() { foreach (i; 0 .. 2) { foreach(inout char x; "hola") { printf("%c", x); x = '?'; } } }
This doesn't compile any more. (dmd 2.058) It was probably fixed with the other inout bugs.