D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7596 - traits compiles can't detect non-copyable errors
Summary: traits compiles can't detect non-copyable errors
Status: RESOLVED DUPLICATE of issue 8356
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-26 13:22 UTC by Martin Nowak
Modified: 2014-09-14 13:01 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2012-02-26 13:22:14 UTC
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 hsteoh 2014-07-30 00:53:16 UTC
Seems to fixed in git HEAD, it compiles successfully.
Comment 2 Kenji Hara 2014-09-14 13:01:58 UTC

*** This issue has been marked as a duplicate of issue 8356 ***