[Issue 16504] New: `dup` can't use storage calss `scope` for its parameter in general
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Sep 17 06:05:38 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16504
Issue ID: 16504
Summary: `dup` can't use storage calss `scope` for its
parameter in general
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: verylonglogin.reg at gmail.com
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
--
More information about the Digitalmars-d-bugs
mailing list