class Foo { int opApply(scope int delegate(ref int) const dg) { return 0; } } class Bar { Foo foo; void hoge() const { foreach(fuga; foo){ } } } void main() { (new Bar()).hoge(); }
Standard input is empty
prog.d(3): const/immutable/shared/inout attributes are only valid for non-static member functions
Standard output is empty