[Issue 4524] New: Bus error with nested struct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 27 21:48:59 PDT 2010
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: nobody at puremagic.com
ReportedBy: andrei at metalanguage.com
--- Comment #0 from Andrei Alexandrescu <andrei at 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: -------
More information about the Digitalmars-d-bugs
mailing list