Bug 17656 – Enum member circular reference error

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-07-16T00:38:07Z
Last change time
2024-12-13T18:53:23Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Elie Morisse
Moved to GitHub: dmd#17806 →

Comments

Comment #0 by syniurge — 2017-07-16T00:38:07Z
enum E { AAA = S.BBB } struct S { enum SZAQ = E.AAA; enum BBB = 8080; } ~~~~~ Error: enum member E.AAA circular reference to enum member ~~~~~ S doesn't have to be a struct, this occurs with any ScopeDsymbol or import.
Comment #1 by dlang-bugzilla — 2017-07-17T04:14:11Z
Changing the order of the declarations makes it compile.
Comment #2 by razvan.nitu1305 — 2018-06-18T14:55:47Z
Comment #3 by robert.schadek — 2024-12-13T18:53:23Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17806 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB