Bug 7596 – traits compiles can't detect non-copyable errors

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-26T13:22:00Z
Last change time
2014-09-14T13:01:58Z
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2012-02-26T13:22:14Z
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.
Comment #1 by hsteoh — 2014-07-30T00:53:16Z
Seems to fixed in git HEAD, it compiles successfully.
Comment #2 by k.hara.pg — 2014-09-14T13:01:58Z
*** This issue has been marked as a duplicate of issue 8356 ***