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

           Summary: static if (__traits(compiles)...) causes program to
                    hang
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2013-04-09 13:37:49 PDT ---
DMD 2.062 Win32

import std.stdio, std.typecons;

void main()
{
    int ee = 0;
    static if (__traits(compiles, { Unique!int(&ee);}))
       auto e = Unique!int(&ee);
    writeln(e); // required to trigger
}

With the static if conditional (which passes) the writeln line causes the
program to hang indefinitely after printing the expected result. Remove the
static if conditional, and the program does not hang, behaves correctly.

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

Reply via email to