https://issues.dlang.org/show_bug.cgi?id=22539
Dlang Bot changed:
What|Removed |Added
Keywords||pull
--- Comment #1 from Dlang Bot ---
@dkorpel
https://issues.dlang.org/show_bug.cgi?id=22539
Walter Bright changed:
What|Removed |Added
CC||bugzi...@digitalmars.com
--- Comment #2 from
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #3 from Dennis ---
(In reply to Walter Bright from comment #2)
> I suspect the problem is actually this line:
>
> scope int*[1] x = [&stackVar];
>
> Since scope is not transitive, allowing this causes the compiler to lose
> track of
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #4 from Walter Bright ---
Add @safe to escape() and it will fail to compile.
--
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #5 from Walter Bright ---
P.S. many times I've chased rabbits only to discover I forgot to add @safe.
@safe really should be the default.
--
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #6 from Dennis ---
(In reply to Walter Bright from comment #4)
> Add @safe to escape() and it will fail to compile.
`escape` is already under `@safe:`. I added `@safe` to escape explicitly to
double check, it still compiles on my end. Wh
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #7 from Dennis ---
(In reply to Walter Bright from comment #5)
> P.S. many times I've chased rabbits only to discover I forgot to add @safe.
> @safe really should be the default.
I didn't forget @safe, I added @safe: on top (as I usually
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #8 from Walter Bright ---
My bad, adding -dip1000 removes the error message. I had neglected to do that.
--
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #9 from Dennis ---
(In reply to Walter Bright from comment #8)
> My bad, adding -dip1000 removes the error message. I had neglected to do
> that.
I guess -dip1000 really should be the default :)
--
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #10 from Walter Bright ---
Moving on from my previous mistakes:
@safe:
ref int* identity(ref return scope int* x) { return x; }
int* escape() {
int stackVar;
scope int* x = &stackVar;
int* y = identit
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #11 from Dennis ---
(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, t
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #12 from Walter Bright ---
Objections? Not at the moment, I'm just trying to thoroughly understand the
problem.
--
https://issues.dlang.org/show_bug.cgi?id=22539
--- Comment #13 from Walter Bright ---
(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.
https://issues.dlang.org/show_bug.cgi?id=22539
Florian Weimer changed:
What|Removed |Added
CC||f...@deneb.enyo.de
--
https://issues.dlang.org/show_bug.cgi?id=22539
Dlang Bot changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
15 matches
Mail list logo