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

          Issue ID: 23380
           Summary: [dip1000] class parameter should not be treated as ref
                    qua lifetime
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: dkor...@live.nl

This should pass:
```
@safe void test(scope Object o0, scope Object o1)
{
    o1 = o0; // Error: scope variable `o0` assigned to `o1` with longer
lifetime
}
```

It doesn't because dmd currently considers o1 a `ref` parameter qua lifetime.

--

Reply via email to