Bug 16504 – [REG 2.072a]`dup` can't use storage class `scope` for its parameter in general
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-09-17T13:05:00Z
Last change time
2017-01-16T23:24:00Z
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0 by verylonglogin.reg — 2016-09-17T13:05:38Z
Currently `scope` is documented [1] as
> references in the parameter cannot be escaped
and `dup` is called for unrestricted set of types so type's postblit can assign references from the parameter to global variable thus violating `scope` storage class assumptions as there is no such restrictions for postblits.
This issues is cause by druntime pull #1637 [2].
[1] https://dlang.org/spec/function.html#parameters
[2] https://github.com/dlang/druntime/pull/1637
Comment #1 by github-bugzilla — 2016-10-29T11:39:34Z