https://issues.dlang.org/show_bug.cgi?id=23035
Issue ID: 23035 Summary: -preview=rvaluerefparam causes @system function to be @safe Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: atila.ne...@gmail.com Related to https://issues.dlang.org/show_bug.cgi?id=20869, which added this test to druntime: ------------- @system unittest { static struct S { void opPostMove(const ref S old) nothrow @system { __gshared int i; new int(i++); // Force @gc impure @system } } alias T = void function() @system nothrow; static assert(is(typeof({ S s; move(s); }) == T)); static assert(is(typeof({ S s; move(s, s); }) == T)); } ------------ If druntime tests are compiled with -preview=rvalueparam, the first static assert fails, since now that function is considered @safe for some reason. --