www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8457] New: Disabled default constructors have no effect when used in arrays

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8457

           Summary: Disabled default constructors have no effect when used
                    in arrays
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: simen.kjaras gmail.com



PDT ---
As discussed many moons ago, here:

http://forum.dlang.org/thread/j3gset$1s16$1 digitalmars.com?page=3#post-op.v01l4tgq1hx7vj:40biotronic-pc.lan

struct S {
     disable this();
}

void main( ) {
    S[] a;
    a.length = 4;
}

The above code should not compile. Changing the length of an array like that
(actually decreasing would be ok) should be a compile-time error, as those new
elements cannot be properly constructed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 27 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8457


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg gmx.com



PDT ---


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 27 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8457




PDT ---


Indeed. Perhaps these two should be merged. I thought of them as two separate issues, but see now that might not be the case. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 27 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8457


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



PDT ---
*** This issue has been marked as a duplicate of issue 7021 ***

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