class Foo { int opApply(scope int delegate(ref int) dg) { return 0; } } class Bar { Foo foo; void hoge() const { foreach(fuga; foo){ } } } void main() { (new Bar()).hoge(); }
Standard input is empty
prog.d(11): Error: function prog.Foo.opApply (scope int delegate(ref int) dg) is not callable using argument types (int delegate(ref int)) const
Standard output is empty