struct S { @disable this(this); } static assert(!__traits(compiles, (S s) => s)); static assert(!__traits(compiles, function S(S s) { return s; })); -------- The error is detected too late, i.e. in the glue layer.
Seems to fixed in git HEAD, it compiles successfully.
*** This issue has been marked as a duplicate of issue 8356 ***