Bug 21646 – Speculative recursive reference to struct with semantic error prints "error: unknown"

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-02-19T08:38:38Z
Last change time
2024-12-13T19:14:47Z
Keywords
pull
Assigned to
No Owner
Creator
FeepingCreature
Moved to GitHub: dmd#19874 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19874 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB