To https://dlang.org/spec/module.html#MixinDeclaration, add two paragraphs: "The content of a mixin cannot be forward referenced by other DeclDefs of the same scope because it is not yet pulled in the AST" ``` class B : A {} mixin ("class A {}"); ``` "forward references may only work in function bodies because they are processed after the declarations" ``` void v() { class B : A {} } mixin ("class A {}"); ```
@RobertGrancsa created dlang/dlang.org pull request #3513 "Fixed issue 22348 - Specify forward referencing of MixinDeclaration" mentioning this issue: - Fixed issue 22348 - Specify forward referencing of MixinDeclaration Signed-off-by: Robert Grancsa <robert.grancsa2002@gmail.com> https://github.com/dlang/dlang.org/pull/3513
dlang/dlang.org pull request #3513 "Fixed issue 22348 - Specify forward referencing of MixinDeclaration" was merged into master: - e756ec366b6606f08dcf6122f58e2de4ec2cb1ae by Robert Grancsa: Fixed issue 22348 - Specify forward referencing of MixinDeclaration Signed-off-by: Robert Grancsa <robert.grancsa2002@gmail.com> - 47bcad87c65f340379887659e9306649d6fc6ebf by Robert Grancsa: Fix Issue 22348 - Specify forward referencing of MixinDeclaration Signed-off-by: Robert Grancsa <robert.grancsa2002@gmail.com> https://github.com/dlang/dlang.org/pull/3513