D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22348 - Specify forward referencing of MixinDeclaration
Summary: Specify forward referencing of MixinDeclaration
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P3 minor
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-02 11:51 UTC by basile-z
Modified: 2023-02-02 10:22 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description basile-z 2021-10-02 11:51:57 UTC
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 Dlang Bot 2023-02-01 19:06:24 UTC
@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
Comment 2 Dlang Bot 2023-02-02 10:22:37 UTC
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