Comment #0 by default_357-line — 2021-02-19T08:38:38Z
struct Type {
enum a = __traits(compiles, Type());
static if (int(Type)) { }
}
Outputs: Error: unknown, please file report on issues.dlang.org on master of 2021-02-19.
<@CyberShadow> Introduced in https://github.com/dlang/dmd/pull/2786 apparently
<@CyberShadow> Before then it showed an appropriate error message
Comment #1 by dlang-bot — 2021-02-19T09:26:12Z
@FeepingCreature created dlang/dmd pull request #12210 "Fix issue 21646: speculative recursive reference to struct with semantic error prints "error: unknown"" fixing this issue:
- When preprocessing function arguments, only replace args with ErrorExps if we managed to report an error.
Otherwise, if errors are gagged, we'll have ErrorExps with no corresponding error message.
Fixes issue 21646.
https://github.com/dlang/dmd/pull/12210
Comment #2 by robert.schadek — 2024-12-13T19:14:47Z