[Issue 23032] passing nested structs to struct templates which make them static should be a warning

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 17 20:22:31 UTC 2022


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

Paul Backus <snarwin+bugzilla at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |snarwin+bugzilla at gmail.com

--- Comment #1 from Paul Backus <snarwin+bugzilla at gmail.com> ---
Simplified example:

---
void main()
{
    int i;

    struct Nested
    {
        ref get() { return i; }
    }

    static Nested n;
    n.get()++; // segfault
}
---

--


More information about the Digitalmars-d-bugs mailing list