[Issue 10123] New: Can't subtract positive number from length of array of struct with disabled default construction
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 20 04:38:31 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10123
Summary: Can't subtract positive number from length of array of
struct with disabled default construction
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-05-20 15:38:29 MSD ---
---
struct S
{ @disable this(); }
void main()
{
S[] arr = [S.init, S.init, S.init];
--arr.length; // Error: struct main.S default construction is disabled
arr.length -= 1; // Same error
size_t n = 1;
arr.length -= n; // Same error
}
---
--
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