[Issue 20006] [REG 2.086.0] DIP1000: return scope ref outlives the scope of the argument
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 28 18:43:11 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20006
--- Comment #2 from Eugene Wissner <belka at caraus.de> ---
The constructor parameter is marked with "return scope ref" and it means that
Inserter isn't allowed to outlive it.
You can also write
this(return scope ref int i) @trusted
{
this.i = &i;
}
and it worked prior to 2.086 as well.
--
More information about the Digitalmars-d-bugs
mailing list