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
dlang/dmd pull request #12280 "Fix 19387 - Mark generated postblits as scope" was merged into master: - 5282d156fb87842f6f8870449fe00f20345847ee by MoonlightSentinel: Fix 19387 - Mark generated postblits as scope Otherwise the postblit is not callable when compiling with DIP 1000. (Assigning scope ... to non-scope `this`) https://github.com/dlang/dmd/pull/12280