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

           Summary: Error: variable has scoped destruction, cannot build
                    closure
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: samu...@voliacable.com


--- Comment #0 from Max Samukha <samu...@voliacable.com> 2011-03-11 10:22:17 
PST ---
The below should compile without errors:

struct S
{
    ~this()
    {
    }
}

void main()
{
    S s;    
    enum error = __traits(compiles, { auto s1 = s; }));
    static assert(!error); // line 1
}
----
Error: static assert  (!true) is false

Comment out "line 1" to get the error that explains the problem:

Error: variable test.main.s has scoped destruction, cannot build closure

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

Reply via email to