[Issue 21286] [DIP1000] Can't return scope reference from a function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 27 07:19:31 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21286
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
As always, it's clearer what's happening when we peel back to abstractions to
mere pointers:
@safe void test()
{
int i;
scope int* p = &i;
scope ref get() { return p; }
get() = &i;
}
--
More information about the Digitalmars-d-bugs
mailing list