[Issue 19387] New: [dip1000] __fieldPostblit should be scope or deduce scope qualifier
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 10 08:18:52 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19387
Issue ID: 19387
Summary: [dip1000] __fieldPostblit should be scope or deduce
scope qualifier
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ilyayaroshenko at gmail.com
Currently, the __fieldPostblit constructor is not scope, this cause bugs that
looks like:
scope variable __copytmpXXX assigned to non-scope parameter this calling
AType.__fieldPostblit.
For example:
------------
struct C
{
void* u;
this(this) scope @safe {}
}
struct S { C c; }
void foo(scope S s) @safe {}
void bar(scope S s) @safe { foo(s); }
------------
<source>(9): Error: scope variable `__copytmp2` assigned to non-scope parameter
`this` calling example.S.__fieldPostblit
Compiler returned: 1
--
More information about the Digitalmars-d-bugs
mailing list