https://issues.dlang.org/show_bug.cgi?id=13805
Kenji Hara <k.hara...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|DMD |Phobos Hardware|x86 |All OS|Windows |All --- Comment #1 from Kenji Hara <k.hara...@gmail.com> --- This would be a Phobos bug in GroupByImpl struct. static if (isForwardRange!Range) { private Range _prev; private void savePrev() { _prev = r.save; } private @property ElementType!Range prev() { return _prev.front; } } else { private ElementType!Range _prev; private void savePrev() { _prev = r.front; } private alias prev = _prev; } this(Range _r) { r = _r; if (!empty) { // Check reflexivity if predicate is claimed to be an equivalence // relation. assert(!equivRelation || pred(r.front, r.front), "predicate " ~ pred.stringof ~ " is claimed to be "~ "equivalence relation yet isn't reflexive"); savePrev(); // <---- here } } As error message says, the _prev field is not correctly initialized inside constructor. Indeed, it's assigned in savePrev member function, but compiler cannot handle the assignment as the initialization. --