← Back to index
|
Original Bugzilla link
Bug 23015 – SysTime opAssign triggers a deprecation: returning `this` escapes a reference to parameter `this`
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-04-14T14:15:00Z
Last change time
2022-04-15T07:31:45Z
Assigned to
No Owner
Creator
Andrea Fontana
Comments
Comment #0
by trikkuz — 2022-04-14T14:15:00Z
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`
Comment #1
by trikkuz — 2022-04-15T07:31:45Z
It seems it was already fixed in master:
https://github.com/dlang/phobos/commit/5636c8cdcc0ea1f29e8f28a7755c1f87df84941e