[Issue 8457] New: Disabled default constructors have no effect when used in arrays
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jul 27 17:16:41 PDT 2012
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 at puremagic.com
ReportedBy: simen.kjaras at gmail.com
--- Comment #0 from Simen Kjaeraas <simen.kjaras at gmail.com> 2012-07-27 17:16:40 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: -------
More information about the Digitalmars-d-bugs
mailing list