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
Commits pushed to stable at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/ce6aef38adbf7f652db67bc7287a97e45c173b8f Revert "Merge pull request #1637 from WalterBright/scope-dup" This reverts commit 35cd63567095bf865e0c7b4bb8bb92945b6244a5, reversing changes made to aee373fb541dafce2769792b4430be82ef25bd2b. - fixes Issue 16504 - dup can't use storage class scope for its parameter in general https://github.com/dlang/druntime/commit/2f3f7c80d9843f4c2de05fdd2e15af71f185cf62 add unittest example for Issue 16504 - fairly synthetic example, but serves as documentation
Comment #2 by github-bugzilla — 2016-11-11T10:27:34Z
Comment #3 by github-bugzilla — 2016-12-27T13:10:51Z
Comment #4 by github-bugzilla — 2017-01-16T23:24:00Z
Commits pushed to newCTFE at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/ce6aef38adbf7f652db67bc7287a97e45c173b8f Revert "Merge pull request #1637 from WalterBright/scope-dup" https://github.com/dlang/druntime/commit/2f3f7c80d9843f4c2de05fdd2e15af71f185cf62 add unittest example for Issue 16504