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

          Issue ID: 24442
           Summary: [DIP1000] struct member slice cannot point to other
                    struct member
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: johanenge...@weka.io

Testcase with `-dip1000`:

```
struct S {
    int[10] array;
    int[] slice;

    void foo() @safe {
        slice = array[];
    }
}
```

results in error:
```
<source>(6): Error: address of variable `this` assigned to `this` with longer
lifetime
```

--

Reply via email to