Thread overview | ||||||
---|---|---|---|---|---|---|
|
July 28, 2012 [Issue 8457] New: Disabled default constructors have no effect when used in arrays | ||||
---|---|---|---|---|
| ||||
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 --- Comment #0 from Simen Kjaeraas <simen.kjaras@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: ------- |
July 28, 2012 [Issue 8457] Disabled default constructors have no effect when used in arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simen Kjaeraas | http://d.puremagic.com/issues/show_bug.cgi?id=8457 Jonathan M Davis <jmdavisProg@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg@gmx.com --- Comment #1 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-07-27 17:24:22 PDT --- More like @disable this(); is completely broken for structs: bug# 7021 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 28, 2012 [Issue 8457] Disabled default constructors have no effect when used in arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simen Kjaeraas | http://d.puremagic.com/issues/show_bug.cgi?id=8457 --- Comment #2 from Simen Kjaeraas <simen.kjaras@gmail.com> 2012-07-27 17:28:51 PDT --- (In reply to comment #1) > More like @disable this(); is completely broken for structs: bug# 7021 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: ------- |
July 28, 2012 [Issue 8457] Disabled default constructors have no effect when used in arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Simen Kjaeraas | 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 --- Comment #3 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-07-27 17:30:18 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: ------- |
Copyright © 1999-2021 by the D Language Foundation