D Language Foundation April Quarterly Meeting and Server Meeting Summaries
FeepingCreature
feepingcreature at gmail.com
Thu May 5 13:52:14 UTC 2022
On Wednesday, 4 May 2022 at 16:21:19 UTC, Mike Parker wrote:
> Mario also mentioned that Mathis Beer is having "the usual
> problems" in his work because he is always "in the dark areas
> of the D compiler", but they have nothing causing them any
> major issues that need immediate attention.
>
I don't get sensible bugs anymore! It's all cryptic stuff like
"if I use random feature one, then random feature two while
wrapped in random feature three, plus a syntax error in an
unrelated module, the compiler literally catches on fire."
My favorite recent one is
https://issues.dlang.org/show_bug.cgi?id=22949
If you:
- define a module with an enum that has an initializer that
doesn't exist
- and in another module, you define a struct
- that speculatively compiles itself via `__traits(compiles)`
- (dmd starts sweating nervously)
- and imports from the first module a symbol that doesn't exist
- then mixes it in
- then import the first module again
- and evaluate the enum
Then you get an "Error: Unknown."
This code has like three different errors! Missing import, mixin
of a missing symbol, enum with an invalid initializer. Each of
those individually, or in combinations of two, would be reported
just fine. But, I think because `__traits(compiles)`
strategically blocks *all* of them from being printed, the
compiler ends up in a state where it knows that everything is
wrong, but can no longer quite work out why or how.
They're all like this.
Well, that or bugs with `immutable`.
More information about the Digitalmars-d-announce
mailing list