[Issue 9181] Forward reference error in struct static fields

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 4 10:34:33 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=9181

--- Comment #1 from Basile-z <b2.temp at gmx.com> ---
Funnily this alternative, which still needs inference for the array, works

---
struct Foo {
    static immutable foos1 = [F];
    static immutable F = Foo();
} 
---

Because type semantic of `F` is launched when doing the one of `foo1`, hence
`F` is not already "inuse".

--


More information about the Digitalmars-d-bugs mailing list