Bug 22348 – Specify forward referencing of MixinDeclaration
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P3
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-10-02T11:51:57Z
Last change time
2023-02-02T10:22:37Z
Assigned to
No Owner
Creator
Basile-z
Comments
Comment #0 by b2.temp — 2021-10-02T11:51:57Z
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 {}");
```
Comment #1 by dlang-bot — 2023-02-01T19:06:24Z
@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 <[email protected]>
https://github.com/dlang/dlang.org/pull/3513
Comment #2 by dlang-bot — 2023-02-02T10:22:37Z
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 <[email protected]>
- 47bcad87c65f340379887659e9306649d6fc6ebf by Robert Grancsa:
Fix Issue 22348 - Specify forward referencing of MixinDeclaration
Signed-off-by: Robert Grancsa <[email protected]>
https://github.com/dlang/dlang.org/pull/3513