[Issue 22348] New: Specify forward referencing of MixinDeclaration
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 2 11:51:57 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22348
Issue ID: 22348
Summary: Specify forward referencing of MixinDeclaration
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
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 {}");
```
--
More information about the Digitalmars-d-bugs
mailing list