[Issue 21632] New: Constructor flow analysis doesn't understand lambdas

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 13 02:04:28 UTC 2021


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

          Issue ID: 21632
           Summary: Constructor flow analysis doesn't understand lambdas
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: snarwin+bugzilla at gmail.com

Example program:

---
struct MustInit
{
    @disable this();
}

struct S
{
    MustInit mem;
    this(MustInit val) {
        () @trusted { mem = val; }();
    }
}
---

Output from DMD 2.095.0:

---
bug.d(9): Error: constructor `bug.S.this` field `mem` must be initialized but
skipped
---

--


More information about the Digitalmars-d-bugs mailing list