[Issue 18282] [Scope][DIP1000]Assignment of local variable to `scope` variable not recognized by compiler
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 16 10:23:28 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18282
ag0aep6g <ag0aep6g at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #6 from ag0aep6g <ag0aep6g at gmail.com> ---
(In reply to Walter Bright from comment #4)
> https://github.com/dlang/dmd/pull/8030
That seems to have fixed this snippet from comment #2:
----
string* f() @safe
{
scope string*[] ls;
return ls[0];
}
----
But the original test case still fails:
----
void main() @safe
{
string foo = "foo";
scope string*[] ls;
ls ~= &foo; /* Error. But this works: ls = ls ~ &foo; */
}
----
Looks like the actual issue hasn't been fixed. Reopening.
--
More information about the Digitalmars-d-bugs
mailing list