[Issue 17448] Move semantics cause memory corruption and cryptic bugs
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 6 18:51:33 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=17448
--- Comment #27 from Tomer Filiba (weka) <tomer at weka.io> ---
(In reply to Andrei Alexandrescu from comment #25)
> > So... more special cases?
>
> That's a straight use of scope per DIP 1000, in fact the very design intent:
> scope in a function signature specifies the function won't escape the
> parameter.
I don't suppose this would help. It seems the & operator is just not allowed in
safe code:
void main() @safe {
int x;
auto tmp = &x; // Error: cannot take address of local x in @safe
function
}
--
More information about the Digitalmars-d-bugs
mailing list