[Issue 21228] OutputRange-based toString is silently ignored if isOutputRange is not imported

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 5 21:50:21 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21228

moonlightsentinel at disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |moonlightsentinel at disroot.o
                   |                            |rg
          Component|dmd                         |phobos

--- Comment #1 from moonlightsentinel at disroot.org ---
Nope, this is an issue with the toString detection in phobos. dmd reports an
error if the template constraint fails to compile (see
https://run.dlang.io/is/9g2V1G).

The problem is that phobos uses speculative compilation to detect if a struct
defines toString - which swallows the aforementioned error message.

--


More information about the Digitalmars-d-bugs mailing list