[Issue 23015] New: SysTime opAssign triggers a deprecation: returning `this` escapes a reference to parameter `this`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 14 14:15:00 UTC 2022


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

          Issue ID: 23015
           Summary: SysTime opAssign triggers a deprecation: returning
                    `this` escapes a reference to parameter `this`
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: trikkuz at gmail.com

DMD64 D Compiler v2.099.1:

---

import std;

void main()
{
    SysTime a;
    SysTime b;
    b = a;
}

---

/usr/include/dmd/phobos/std/datetime/systime.d(700): Deprecation: returning
`this` escapes a reference to parameter `this`
/usr/include/dmd/phobos/std/datetime/systime.d(696):        perhaps change the
`return scope` into `scope return`

--


More information about the Digitalmars-d-bugs mailing list