https://issues.dlang.org/show_bug.cgi?id=13919
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice Hardware|x86_64 |All OS|Linux |All Severity|enhancement |major --- Comment #1 from Kenji Hara <[email protected]> --- Reduced test case: alias T = Array!int; pragma(msg, typeof(T.init[].front.init)); struct RefCounted(T) { //struct RefCountedStore //{ struct Impl { T _payload; size_t _count; } Impl* _store; //} //RefCountedStore _refCounted; ~this() {} // necessary @property ref inout(T) refCountedPayload() inout { return /*_refCounted.*/_store._payload; } alias refCountedPayload this; } struct Array(T) { struct Payload { size_t _capacity; T[] _payload; } RefCounted!Payload _data; static struct Range { Array _outer; this(ref Array data) // necessary { //_outer = data; } @property ref T front() { return _outer._data._payload[_a]; } } Range opSlice() { return Range(this); } } --
