[Issue 24208] [DIP1000] Nested function can escape scope parameter

2023-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24208 --- Comment #3 from Paul Backus --- Disregard previous example, I read the errors wrong. They occur in the function bodies, not at the call site. The parameter of `escape` is not allowed to escape at all if it is `scope`, even `return scope`. --

[Issue 24208] [DIP1000] Nested function can escape scope parameter

2023-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24208 --- Comment #2 from Paul Backus --- ...or maybe the problem is that it's being incorrectly inferred as `scope` instead of `return scope`. Another example: --- void main() @safe { int* escaped; void escape1(int* p) @safe {

[Issue 24208] [DIP1000] Nested function can escape scope parameter

2023-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=24208 Paul Backus changed: What|Removed |Added Summary|[DIP1000] Nested function |[DIP1000] Nested function