November 27, 2021 [Issue 22539] [dip1000] slicing of returned ref scope static array should not be allowed | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22539 --- Comment #11 from Dennis <dkorpel@live.nl> --- (In reply to Walter Bright from comment #10) > No error; bad. The slicing of the return value of identity() is not properly propagating the scope-ness of its argument x. This would be a problem in escape.d. Yes, the scope-ness is lost because there is no transitive scope, so the slicing shouldn't be allowed in @safe code. It's essentially the same as: https://issues.dlang.org/show_bug.cgi?id=20691 Which you fixed with: https://github.com/dlang/dmd/pull/10951 But that fix is limited to variables, not return values, so my pull request extends it by also considering slicing a CallExp: https://github.com/dlang/dmd/pull/13362 I don't understand what your comment is getting at, do you have any objections to this? -- |
November 28, 2021 [Issue 22539] [dip1000] slicing of returned ref scope static array should not be allowed | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22539 --- Comment #12 from Walter Bright <bugzilla@digitalmars.com> --- Objections? Not at the moment, I'm just trying to thoroughly understand the problem. -- |
November 29, 2021 [Issue 22539] [dip1000] slicing of returned ref scope static array should not be allowed | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22539 --- Comment #13 from Walter Bright <bugzilla@digitalmars.com> --- (In reply to Walter Bright from comment #12) > Objections? Not at the moment, I'm just trying to thoroughly understand the problem. See the PR for my remaining objection. Thanks for your patience with this. -- |
February 13, 2022 [Issue 22539] [dip1000] slicing of returned ref scope static array should not be allowed | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22539 Florian Weimer <fw@deneb.enyo.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fw@deneb.enyo.de -- |
March 10, 2022 [Issue 22539] [dip1000] slicing of returned ref scope static array should not be allowed | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22539 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #14 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/dmd pull request #13362 "Fix issue 22539 - slicing of returned ref scope static array should not be allowed" was merged into master: - 8f3f72f93a6b6241342c495c569f294c4ea0238f by dkorpel: Fix issue 22539 - slicing of returned ref scope static array should not be allowed https://github.com/dlang/dmd/pull/13362 -- |
Copyright © 1999-2021 by the D Language Foundation