www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11448] New: `dup` calls system impure code from safe pure function


           Summary: `dup` calls  system impure code from  safe pure
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com

--- Comment #0 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-11-06
09:56:19 MSK ---
As `dup` calls postblit it should be either  system impure or conditionally
 safe pure as suggested in Issue 5700:
struct S
{ this(this){} }

void main()  safe pure
    S[1] s;
    s.dup; // should not be allowed

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