http://d.puremagic.com/issues/show_bug.cgi?id=4524

           Summary: Bus error with nested struct
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: and...@metalanguage.com


--- Comment #0 from Andrei Alexandrescu <and...@metalanguage.com> 2010-07-27 
21:48:58 PDT ---
The code below causes a bus error on OSX:

import std.stdio, std.range;

void main()
{
    struct BiRange
    {
        int[] payload;
        @property bool empty() { return payload.empty; }
        @property BiRange save() { return this; }
        @property ref int front() { return payload[0]; }
        @property ref int back() { return payload[$ - 1]; }
        void popFront() { return payload.popFront(); }
        // void popBack() { return payload.popBack(); }
    }
    auto r = BiRange([1, 2, 3, 10, 11, 4]);
}

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

Reply via email to