https://issues.dlang.org/show_bug.cgi?id=18994
Issue ID: 18994 Summary: Use noncopyable variable in foreach loop without ref results in error message without line number Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: yshu...@gmail.com struct Type2 { int opApply(int delegate(ref Type1)) { return 0; } } struct Type1 { @disable this(this); } void test() { foreach(b; Type2()) {} } This could even crash the compiler when -dip1000 is used. --