Bug 21207 – Mixin get processed in lexical order, resulting in forward reference issues

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-08-28T17:16:18Z
Last change time
2024-12-13T19:11:18Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Mathias LANG
Moved to GitHub: dmd#17985 →

Comments

Comment #0 by pro.mathias.lang — 2020-08-28T17:16:18Z
``` void foo (Callback cb); mixin(q{ alias Callback = void delegate(); }); ``` > test.d(1): Error: undefined identifier Callback Swap the order and it works.
Comment #1 by robert.schadek — 2024-12-13T19:11:18Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17985 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB