[Issue 4316] New: this(this) cannot become safe function.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 14 23:39:57 PDT 2010


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

           Summary: this(this) cannot become safe function.
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: zan77137 at nifty.com


--- Comment #0 from SHOO <zan77137 at nifty.com> 2010-06-14 23:39:56 PDT ---
This code doesn't work!

-------------------------------

struct A
{
    @safe this(this) { }
}

@safe void main()
{
    A a;
    auto b = a; // Error: safe function 'main' cannot call system function
'__cpctor'
}

-- 
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