November 14, 2023
https://issues.dlang.org/show_bug.cgi?id=24243

          Issue ID: 24243
           Summary: Can't format chain(filter, filter)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody@puremagic.com
          Reporter: default_357-line@yahoo.de

module test;

import std.algorithm;
import std.range;
import std.stdio;

void main() {
    writefln!"%s"(chain([2].filter!"a", [3].filter!"a"));
}

And then

phobos/std/algorithm/iteration.d(1396): Error: Attempting to fetch the front of
an empty filter.
phobos/std/range/package.d(1094):        called from here:
`this.__source_field_0.front()`
phobos/std/range/package.d(1094):        called from here:
`fixRef(this.__source_field_0.front())`
phobos/std/format/internal/write.d(1500):        called from here:
`val.front()`
phobos/std/format/internal/write.d(1500):        called from here:
`formatElement(w, val.front(), f)`
phobos/std/format/internal/write.d(2523):        called from here:
`formatRange(w, val, f)`
phobos/std/format/write.d(1239):        called from here: `formatValueImpl(w,
val, f)`
phobos/std/format/write.d(632):        called from here: `formatValue(w,
__param_2, spec)`
phobos/std/format/package.d(741):        called from here:
`formattedWrite(NoOpSink(), "%s", Result(FilterResult(null, false),
FilterResult(null, false), 0LU))`
phobos/std/format/package.d(748):        called from here: `(*function () pure
nothrow @safe => null)()`
phobos/std/stdio.d(4473): Error: template instance
`std.format.checkFormatException!("%s", Result)` error instantiating
test.d(8):        instantiated from here: `writefln!("%s", Result)`

--