January 21, 2023 [Issue 23646] New: A nastier forward reference bug | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23646 Issue ID: 23646 Summary: A nastier forward reference bug Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: maxsamukha@gmail.com alias aliases(a...) = a; alias Components = Dependencies!Top; template Dependencies(alias Component) { alias Dependencies = aliases!(Top.DirectDependencies); // alias Dependencies = Top.DirectDependencies; // but this succeeds } struct Top { alias DirectDependencies = aliases!(); enum l = Components.length; } ---- Error: template instance `onlineapp.Dependencies!(Top)` error instantiating Moving `Components` last makes the code compile. -- |
Copyright © 1999-2021 by the D Language Foundation