[Issue 7596] New: traits compiles can't detect non-copyable errors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 26 13:22:15 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7596

           Summary: traits compiles can't detect non-copyable errors
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dawg at dawgfoto.de


--- Comment #0 from dawg at dawgfoto.de 2012-02-26 13:22:14 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list