Bug 19388 – [dip1000] scope return parameters should be safely assigned in scope constructor

Status
RESOLVED
Resolution
WORKSFORME
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-11-10T09:04:12Z
Last change time
2021-03-15T07:36:23Z
Assigned to
No Owner
Creator
Илья Ярошенко

Comments

Comment #0 by ilyayaroshenko — 2018-11-10T09:04:12Z
struct C { void* u; this(scope return void* v) @safe scope { this.u = v; } } <source>(6): Error: scope variable `v` assigned to `this` with longer lifetime Compiler returned: 1 This DIP just ignores constructors. This cause a lot of issues during libraries updates.
Comment #1 by moonlightsentinel — 2021-03-15T07:36:23Z
Works with current master (>2.096.0)