Bug 24666 – Two modules, mutually importing each other, silently ignores bodies of static conditions

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-07-17T10:49:50Z
Last change time
2024-12-13T19:36:30Z
Assigned to
No Owner
Creator
feklushkin.denis
Moved to GitHub: dmd#20487 →

Comments

Comment #0 by feklushkin.denis — 2024-07-17T10:49:50Z
Two modules, mutually importing each other, silently ignores bodies of static conditions: p1/m1.d: module p1.m1; import p2.m2; // if commented out then code works as expected //alias A = int; // will work if uncomment and comment out next code: static if(true) alias A = int; // declaration will be ignored p2/m2.d: module p2.m2; import p1.m1: A; main.d: import p1.m1; void main() { A a; } Compilation: ldc2 -c -I. main.d p2/m2.d(3): Error: module `p1.m1` import `A` not found
Comment #1 by ibuclaw — 2024-08-05T11:13:22Z
Comment #2 by robert.schadek — 2024-12-13T19:36:30Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20487 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB