Probably trivial, but VERY frustrating compiler bug

H. S. Teoh hsteoh at
Thu Aug 13 23:14:41 UTC 2020

On Thu, Aug 13, 2020 at 10:43:03PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
> On Thursday, 13 August 2020 at 22:33:04 UTC, H. S. Teoh wrote:
> > Well, Phobos has a unittest in std.format that relies on the exact
> > output of .stringof.
> yeah stringof should NEVER be used for anything other than diagnostics
> intended for a human reader along with other info... its exact format
> is undefined!
> > Come to think of it, maybe we should just kill that unittest with
> > fire.
> tbh any unittest that tests specific strings is probably suspect.

I found two unittests that test for exact .stringof format:

std/format.d:2152	assert(to!string(&bar) == "int delegate(short) @nogc delegate() pure nothrow @system");
std/format.d:4802	version (linux) formatTest( &func, "void delegate() @system" );

The second is the one giving me trouble, and already somebody has put in
a `version(linux)` hack, presumably it fails in one of the non-linux
machines in the auto-tester.

I'm *very* tempted to change that line to "version(none)" right now...


Heads I win, tails you lose.

More information about the Digitalmars-d mailing list