www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23015] New: SysTime opAssign triggers a deprecation:

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 puremagic.com
          Reporter: trikkuz 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`

--
Apr 14 2022