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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Denis Shelomovskij <[email protected]> 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: -------